IOS 8 modal presentation viewDidLoad triggers multiple presentations

So, I have a screen that checks certain attributes and in certain circumstances instantly loads another view in a format viewDidLoadwithout animation on top of the current loaded view (so as not to show the view below). Prior to iOS 8, when this was done, the original view would pause its loading (would not continue with viewWillAppear, viewDidLayoutSubviewsetc.) until the overlay controller was rejected. This behavior, which I found, was suitable for my needs, since any animation on the elements in their original form could be performed. However, in iOS 8, I get a completely different chain of events. Firstly, for some reasonviewDidLayoutSubviewscalled twice (what's wrong with that?), but, more importantly, the view is not like when another controller appears at all anytime before viewDidAppear, complaining about unbalanced calls to begin/end appearance transitions. Not only this, but the base viewControllercontinues to load ( viewWillAppear, viewDidLayoutSubviewsetc.), even if it does not appear, which calls all the methods in these events. I appreciate if Apple updates the way to achieve something like this, so if the new meta is a completely different process that I am ready to accept, however, since I cannot get it to work properly.

I would appreciate any help on how to get this modal view to be inserted without forcing the main view to continue loading it.

Thanks
Mike

UPDATE: Switch to code entry. Below is the viewDidLoadmain one viewController, which if necessary represents a modal VC.

-(void) viewDidLoad{

    if(hasNotSeenTutorial){
        TutVC* vc = [[TutVC alloc] initWithNibName:@"tutNib" bundle:nil]

        vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
        [self.navigationController presentViewController:vc animated:NO completion:^{
             NSLog(@"Has Completed Presentation");
         }];
    }
}

This is where the problems are. Invoking the presentation here in viewDidLoadcontinues the presentation of the current VC. Prior to iOS 8, the submitted VC, if it is not already presented, is paused until the modal VC is fired, it will be completed, as usual. This does not apply to iOS 8 according to my original post.

+4
source share
1 answer

Apple ios 8. , : - , , a , ios7, ( , , ). ios 8 . , . UX.

, UI/UX, .

, , - . , , , . , , - viewdidAppear.

, ios7 , :

    if([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
  // Code for ios 8 implementation
}
else
{
  // Code for ios 7 implementation
}

, Wat U . , , , .

+1

All Articles