UIViewController生命周期的理解
if (self = [super init])=======》if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) =======》- (void)viewDidLoad
{
??? [super viewDidLoad];
?? ?
??? NSLog(@"---111111");
}
=======》if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
???????? IWLog(@"initWithNibName"); 運(yùn)行里面的數(shù)據(jù)}
=======》
if (self = [super init]) {
??????? IWLog(@"init");
??????? // 添加所有的子控制器
運(yùn)行里面的數(shù)據(jù)
??? }
//***********************************************************//
- (void)viewWillAppear:(BOOL)animated
{
??? [super viewWillAppear:animated];
???? NSLog(@"---111111");
}
再調(diào)用
- (void)layoutSubviews
{
??? [super layoutSubviews];
}
轉(zhuǎn)載于:https://www.cnblogs.com/dixuexiongying/p/4769409.html
總結(jié)
以上是生活随笔為你收集整理的UIViewController生命周期的理解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: WCF trace、log
- 下一篇: 微信公众号开发 ssl connect