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.