1.What is the difference Between APPKit and UIKit?
Answer: AppKit AppKit is included in the OS X SDK only.It provides all the classes and controls you need for creating Mac applications.Most of these classes share a common naming prefix starts with NS and classes you will be working with include NSWindow, NSButton, NSTableView. |
UiKit is the framework that iOS uses to provide its UI and its classes start with a UI prefix. For example, both frameworks have a class to represent color include UIColor,while other concepts are pretty unique to UIKit, such as its use of predefined controllers such as UINavigationController and UITabBarController.
Read:
What is the difference between IBOutlet and IBAction in iOS ?
Some important points About View Controller.
2.What is Core Data in iOS ?
Answer:
Core Data is a powerful unified framework Provided by Apple for persisting data in the applications. It is cheap in terms of processes usage and relationship between data can also be maintained easily.
Read:
Core Data Interview Questions and Answers
3.What is the difference b/w loadview and viewdidload ?
Answer:-
loadView
loadView is called by the view controller to load the view. It is the active action of creating and instantiating the UIView object.
This is where the view controller decides how the view should look based on what it knows from the storyboard.
viewDidLoad
viewDidLoad is called after loadView has completed all its tasks and the UIView is ready for display.
It is where you initialize any properties of the view or the view controller object and finalize them before viewWillAppear is called.
If you are using storyboard, you would almost never use loadView.
Even if you do, most of the initialization of different properties of the view should be done in viewDidLoad, as stated in the Apple documentation.
Read:
Basic iOS interview Questions And Answers
Some important notes about View in iPhone.
Explain The Difference Between loadView() And viewDidLoad() in iOS
4.What are @property,@synthesize, @implementation,@interface in iOS?
Answer:
@property generates prototypes for getter and setter methods. You usually place it in an @interface block which is itself in a .h file.
@synthesize generates getter and setter methods. You usually place it in an @implementation block which is itself in a .m file.
The @interface block is where you declare a object's methods and attributes.
The @implementation block is where you write the code of the object's methods.
Read:
Why properties are made nonatomic in Objective C?
Best Tutorials- Properties in objective C
5.What is Blocks in Objective-C ?
Answer:
In Objective-C class defines an object that combines data with related behaviour.
Sometimes, it makes sense just to represent a single task or unit of behaviour, rather than a collection of methods.
Blocks are a language-level feature added to C, Objective-C and C++ which allow you to create distinct segments of code that can be passed around to methods or functions as if they were values.
Blocks are Objective-C objects which means they can be added to collections like NSArray or NSDictionary.
They also have the ability to capture values from the enclosing scope, making them similar to closures or lambdas in other programming languages
Block declaration syntax:
returntype (^blockName)(argumentType);
Simple block implementation
returntype (^blockName)(argumentType)= ^{
};
Here is a simple example:
void (^simpleBlock)(void) = ^{
NSLog(@"This is a block");
};
How to invoke:
simpleBlock();
Read:
Top iOS Interview Questions And Answers for Beginners
iOS Interview Questions with Answers part4
iOS Interview Questions And Answers part12
What is the use of plist ?
What is .ipa in iOS ?
What is .xib in iOS ?
Your apps will scale automatically on iPhone 6, iPhone 6 Plus screens.