I have a 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, the controller ( SendMsgViewController ) viewDidLoad I have the following:
[self presentViewController:picker animated:YES completion:NULL];
where the collector is a UIImageViewPicker .
The problem is that when I call the openSendVC method, the new controller opens, but viewWillDisappear (the first viewController) is not called.
source share