UIViewController生命周期

详细原文

//类的初始化方法

+ (void)initialize;

//对象初始化方法

- (instancetype)init;

//从归档初始化

- (instancetype)initWithCoder:(NSCoder *)coder;

//加载视图

-(void)loadView;

//将要加载视图

- (void)viewDidLoad;

//将要布局子视图

-(void)viewWillLayoutSubviews;

//已经布局子视图

-(void)viewDidLayoutSubviews;

//内存警告

- (void)didReceiveMemoryWarning;

//已经展示

-(void)viewDidAppear:(BOOL)animated;

//将要展示

-(void)viewWillAppear:(BOOL)animated;

//将要消失

-(void)viewWillDisappear:(BOOL)animated;

//已经消失

-(void)viewDidDisappear:(BOOL)animated;

//被释放

-(void)dealloc;

你可能感兴趣的:(UIViewController生命周期)