First about the next nib, NIB is the product of the previous version 3.0, under the terminal we can see that the nib is actually a folder, there are executable binary files;
Distinguish between Xib and storyboard?
Different points:
1>, either nib or xib, will eventually be translated into an executable nib file until the Uiviewcontroller life cycle function Loadview is executed.
2> Storyboard is a description file for multiple Xib file collections, and a xib file corresponds to a view controller and multiple views.
When Toryboard, a project requires only one master storyboard file to be able.
Same point:
1> is an XML-based profile that enables visual programming.
//------------------------------------------------------------------------------------------------------------- --------------------------------------------------//
Main.storyboard file. So, how is storybord loaded?
AppDelegate.h is one of several default files that are automatically generated when you create storyboard apps. The schematic is as follows:
Import <UIKit/UIKit.h>
@interface Appdelegate:uiresponder <UIApplicationDelegate>
@property (Strong, nonatomic) UIWindow *window;
@end
Often say good, a hero three help. Just looking at appdelegate.h/m is not enough, Storybord still has three heroes.
You will see that the key value of Uimainstoryboardfile or "main storyboard file base name" is set to main.
When the app starts, Uiapplicaiton automatically loads the Main.storyboard file. At the same time, the Main.storyboard is loaded automatically
Maybe you've noticed that when the app starts, it does the work, but we haven't written a single line of code yet. The biggest implication of the introduction of storyboard technology is that it greatly reduces the amount of code associated with the UI.
Storyboard helper: Settings for Deployment Info. as follows:
Storyboard Helper: main.m file, the code is as follows:
#import <UIKit/UIKit.h> #import "AppDelegate.h" int main (int argc, char *argv[]) { @autoreleasepool { Return Uiapplicationmain (argc, argv, Nil, Nsstringfromclass ([Appdelegate class]); }}
In MAIN.M, although the statement is not many, but this statement directly determines the life cycle of the app. The purpose of this line of code is to pass the app delegate class to Uiapplicationmain.
Only the nib needs to write more code by hand. Understand these principles, even if you create a project based on XCODE5, you can also put main.storyboard in disregard,
The difference between the nib, Xib, and storyboard of iOS and the loading process for storyboard