#viewDidLoad

控制器view的加载顺序initWithNibName >>> viewDidLoad >>> viewWillAppear >>> viewDidAppear

 执行顺序:initWithNibName>>>viewDidLoad>>>viewWillAppear>>>viewDidAppear ...

awakeFromNib与viewDidLoad的区别

当一个nib文件对应两个类,File'sOwner的class为XXXViewController,Objects下的View对应的为XXXView时:awakeFromNib:在XXXView.m文件中有效,即只有写在这个类文件中才会调用,写在XXXViewController.m文件中时,不会被调用。viewDid...
代码星球 ·2020-04-05

IOS 视图控制对象生命周期-init、viewDidLoad、viewWillAppear、viewDidAppear、viewWillDisappear等的区别及用途

iOS视图控制对象生命周期-init、viewDidLoad、viewWillAppear、viewDidAppear、viewWillDisappear、viewDidDisappear的区别及用途init-初始化程序viewDidLoad-加载视图viewWillAppear-UIViewController对象的...