4
私はこの方法有するUIViewController
有する場合viewDidDisappearが呼び出されない:私は以下た第2のビューコントローラ(SendMsgViewController
)viewDidLoad
において使用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];
}
を:
ピッカーがUIImageViewPicker
ある
[self presentViewController:picker animated:YES completion:NULL];
を。
openSendVC
メソッドを呼び出すと、新しいコントローラが開きますが、最初のviewControllerのviewWillDisappear
は呼び出されません。
しかし私は 'UIModalPresentationFullScreen'モーダルを提示しているプレゼンテーションビューコントローラ上でviewDidDisappearが呼び出されているのを観察していますが、' UIModalPresentationFormSheet'モーダルではありません。 – Hlung