1, Alloc create objects, allocate space
2. Init (Initwithnibname) initializes the object, initializes the data
3, Loadview from the nib load view, usually this step does not need to interfere. Unless you're not using the Xib file to create a view
4, Viewdidload loading complete, can be customized data and dynamic creation of other controls
5. The Viewwillappear view will appear before the screen, and the view will be displayed on the screen immediately (Xib is loaded here)
6, Viewdidappear view has been rendered on the screen completed
When a view is removed from the screen and the execution order is destroyed, the order is almost the opposite of the above
1. Viewwilldisappear view will be removed from the screen before execution
2, Viewdiddisappear view has been removed from the screen, the user can not see this view
3. Dealloc view is destroyed, you need to release the objects you created in Init and viewdidload
-(void) Viewdidload {
[Super Viewdidload];
}
-(void) didreceivememorywarning {
[Super didreceivememorywarning];
Dispose of any resources the can be recreated.
}
-(void) Viewdidappear: (BOOL) animated{
[Super viewdidappear:animated];
}
-(void) Viewwillappear: (BOOL) animated
{
[Super viewwillappear:animated];
}
-(void) Viewwilldisappear: (BOOL) animated
{
[Super viewwilldisappear:animated];
}
IOS Page Load Order