我有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];
}
Run Code Online (Sandbox Code Playgroud)
在第二个视图controller(SendMsgViewController)中,viewDidLoad我有以下内容:
[self presentViewController:picker animated:YES completion:NULL];
Run Code Online (Sandbox Code Playgroud)
挑选者是一个UIImageViewPicker.
问题是,当我调用该方法时,openSendVC会打开一个新的控制器,但是viewWillDisappear(第一个viewController)没有被调用.