- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSLog(@"V1 viewDidLoad");
}
- (void)viewWillAppear:(BOOL)animated{
NSLog(@"V1 viewWillAppear");
}
- (void)viewDidDisappear:(BOOL)animated{
NSLog(@"v1 viewDidDisappear");
}
- (void)viewWillDisappear:(BOOL)animated{
NSLog(@"V1 viewWillDisappear");
}
- (IBAction)pushToNextPage:(id)sender {
SecondViewController *vc = [[SecondViewController alloc]init];
[self.navigationController pushViewController:vc animated:YES];
NSLog(@"****************push******************");
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
NSLog(@"V2 viewDidLoad");
}
- (void)viewWillAppear:(BOOL)animated{
NSLog(@"V2 viewWillAppear");
}
- (void)viewDidDisappear:(BOOL)animated{
NSLog(@"v2 viewDidDisappear");
}
- (void)viewWillDisappear:(BOOL)animated{
NSLog(@"V2 viewWillDisappear");
}
- (IBAction)pop:(id)sender {
[self.navigationController popViewControllerAnimated:YES];
NSLog(@"****************pop******************");
}
2019-01-09 09:49:55.195058+0800 viewControllerdemo[56589:5111467] V1 viewDidLoad
2019-01-09 09:49:55.195401+0800 viewControllerdemo[56589:5111467] V1 viewWillAppear
2019-01-09 09:50:05.376997+0800 viewControllerdemo[56589:5111467] ****************push******************
2019-01-09 09:50:05.378380+0800 viewControllerdemo[56589:5111467] V2 viewDidLoad
2019-01-09 09:50:05.378531+0800 viewControllerdemo[56589:5111467] V1 viewWillDisappear
2019-01-09 09:50:05.378636+0800 viewControllerdemo[56589:5111467] V2 viewWillAppear
2019-01-09 09:50:05.900201+0800 viewControllerdemo[56589:5111467] v1 viewDidDisappear
2019-01-09 09:50:10.158618+0800 viewControllerdemo[56589:5111467] ****************pop******************
2019-01-09 09:50:10.158970+0800 viewControllerdemo[56589:5111467] V2 viewWillDisappear
2019-01-09 09:50:10.159065+0800 viewControllerdemo[56589:5111467] V1 viewWillAppear
2019-01-09 09:50:10.664007+0800 viewControllerdemo[56589:5111467] v2 viewDidDisappear
网友评论