The creation process of the Controller view:
1, first load Loadview,if any, that is, according to the code inside the creation;
2loadview No relevant code, based on main.storyboard< Span style= "Font-family:simsun;" lang= "ZH-CN" > file to create, Main.storyboard There is, according to the description inside create
3,Main.storyboard inside no related interface, then will find nibname xib file, if there is, that is, based on the interface created;
4, if the nibname file can not be found, then will find view.xib files, if any, that is, based on the interface created;
5, if there is no viw.xib, then directly find the viewcontroller.xib file, if so, that is, based on the interface created;
6, if there is no viewcontroller.xib, then the window will create a blank view.
As shown in the following examples:
Life cycle Methods for controller view:
Viewdidload:view Loading complete
Viewwillappear:view is about to show
Viewdidappear:view Display Complete
Viewwilldisappear:view is about to disappear.
Viewdisappear:view has disappeared.
Viewreceivememorywarning:view Receiving Memory warning
Viewwillunload:view will unload-----Ask to uninstall the view that is not currently displayed in the
Uninstall view
Viewdidunload:view has been uninstalled this method is automatically called by the system before ios5, and is no longer available.
If the view needs to be displayed again, then it will execute, Loadview method, and re-make a new life cycle.
UI advanced--the creation process of the Controller view and the life cycle method