Atomic and Nonatomic properties in Objective C

The favorite interviewer’s question for iOS developers

What is the difference between Atomic and Nonatomic properties in iOS

This has been the favorite question in iOS developer job interviews for many years.

And it is also the first question a beginner iOS developer ask once he sees the declaration of a property in Xcode like this:

@property (nonatomic , strong) NSString *firstName;

The short answer is: Continue reading “Atomic and Nonatomic properties in Objective C”

How to add custom font to iOS app in Xcode

You can add True Type Font (.ttf) or Open Type Font (.otf) to your app and use it the same way you use font provided by iOS.

Add your font file to your Xcode project

From menu bar select File->Add Files to “project_name” or just drag font files to your project Continue reading “How to add custom font to iOS app in Xcode”

How to detect if application run for the first time in iOS using Swift 3

How to detect if app is running for the first time

You can detect if the application is launched for the first time using NSUserDefaults.

Just by looking for a key called “launchedBefore” for example and if its not found then the application is running for the first time.

if not found then create it.

Add the following code to¬†didFinishLaunchingWithOptions() in¬†AppDelegate.swift file Continue reading “How to detect if application run for the first time in iOS using Swift 3”