4
我有具有這種方法的UIViewController
:我有以下viewDidDisappear不叫時使用presentViewController
- (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的)。
但我觀察到,呈現視圖控制器上顯示viewDidDisappear呈現'UIModalPresentationFullScreen'模式,但不與'UIModalPresentationFormSheet'模式。 – Hlung 2017-08-14 08:07:48