先执行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 }