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”
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”
By default function parameters are constants in Swift.
If you attempt to change a parameter within a function you will get a compiler error.
To Solve this issue and enable a function to have an effect outside its scope we should use In-Out parameters. Continue reading “In-Out parameters in Swift”
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”