Load class to memory, called when the program is just started, call before the main function
1.+ (void) load{
}
Initializes the class, which is called once when the class is used for the first time
2.+ (void) initialize{
}
Controller's view schema, setting the controller's root view, overriding this method, the storyboard file will no longer work
3.-(void) loadview{
}
View load Complete
4.-(void) viewdidload{
}
The view will appear
5.-(void) Viewwillappear: (BOOL) animated{
}
This method is called when using files such as Xib/storyboard.
6.-(ID) Initwithcoder: (Nscoder *) adecoder{
}
Called when the load Xib is complete, after 6. When using Xib, we can add components dynamically in the 6&7 two methods.
7.-(void) awakefromnib{
}
When creating a control with a hand code, we typically add components & set some of its own properties in this method dynamically. External calls to the Init method, the system will also automatically call this method
8.-(Instancetype) initWithFrame: (CGRect) frame
{
} generally we calculate the frame in this method, which is the control's last layout child control, which calculates the most accurate
9.-(void) layoutsubviews{
}
Several important methods of iOS