I have an UIViewController
having this method:
- (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];
}
In the second view controller (SendMsgViewController
) viewDidLoad
I have the following:
[self presentViewController:picker animated:YES completion:NULL];
where picker is an UIImageViewPicker
.
The problem is, when I call the method openSendVC
a new controller is opened, but viewWillDisappear
(of the first viewController) is not called.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…