视图生命周期

先执行viewDidLoad()

1
-(void) viewWillAppear:(BOOL)animated 2 { 3 NSLog(@"视图即将出现"); 4 } 5 -(void) viewDidAppear:(BOOL)animated 6 { 7 NSLog(@"视图已经出现"); 8 } 9 -(void) viewWillDisappear:(BOOL)animated 10 { 11 NSLog(@"视图即将消失"); 12 } 13 -(void) viewDidDisAppear:(BOOL)animated 14 { 15 NSLog(@"视图已经消失"); 16 }

 

posted @ 2017-10-15 10:46  vector11248  阅读(147)  评论(0编辑  收藏  举报