我有一个UIViewController
方法:
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
NSLog(@"DISAPPEAR");
lastKnownOrientation = [self interfaceOrientation];
}
-(void)openSendVC{
SendMsgViewController *vc = [[SendMsgViewController alloc]initWithNibName:@"SendMsgViewController" bundle:nil];
[self.navigationController pushViewController:vc animated:NO];
}
在第二个视图控制器 ( SendMsgViewController
)viewDidLoad
我有以下内容:
[self presentViewController:picker animated:YES completion:NULL];
其中选择器是一个UIImageViewPicker
.
问题是,当我调用该方法时,openSendVC
会打开一个新控制器,但viewWillDisappear
没有调用(第一个 viewController)。