1

I notice in iPad only for some reason after dismissViewControllerAnimated, the parent viewWillAppear never gets called. This does not happen on my iPhone6S and iPhone6, viewWillAppear will always get called after dismissViewControllerAnimated.

I tried to use [self.presentingViewController viewWillAppear:YES] to force a call, but it didnt work.

How can I ensure the parent viewWillAppear gets called ? Thanks

NativeRecognitionViewController.mm - here is how I try to dismiss

-(void) ExitNow{
    NSLog(@"Exiting view");

    [self dismissViewControllerAnimated:YES completion:nil];        
    [self.presentingViewController viewWillAppear:YES]; <---I added this to try on iPad but it didnt call the FirstViewController::viewWillAppear. 

this is viewWillAppear function in FirstViewController.mm that I want to be called after I dismiss NativeRecognitionViewController view but it never get called here for iPad.

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];

   .....

Call Stack:

sample image

Axil
  • 3,606
  • 10
  • 62
  • 136
  • set full screen modal presentation style – Cy-4AH Apr 23 '20 at 14:39
  • thanks, it works, is there a way to set all in the project to use Fullscreen instead of Automatic, or I have to set one by one. I'ved got just so many views to set one by one – Axil Apr 24 '20 at 02:53
  • Does this answer your question? [Presenting modal in iOS 13 fullscreen](https://stackoverflow.com/questions/56435510/presenting-modal-in-ios-13-fullscreen) – Cy-4AH Apr 24 '20 at 09:14
  • https://stackoverflow.com/questions/58219138/change-modalpresentationstyle-on-ios13-on-all-uiviewcontroller-instances-at-once <-- i implemented this, and i think it worked well. – Axil Apr 25 '20 at 12:59

0 Answers0