presentViewController in AppDelegate with delay in iOS8

前端 未结 5 733
长发绾君心
长发绾君心 2021-02-02 10:02

So I had a full working solution in iOS7 that displays a LoginViewController via presentViewController in the AppDelegate\'s didFinishLaunching.

Basically I am doing so

5条回答
  •  离开以前
    2021-02-02 10:46

    I have also faced the same problem in iOS8 and I found this solution:

    ABCViewController *obj = [[ABCViewController alloc] initWithNibName:@"ABCViewController" bundle:nil];                        
    
    CATransition *transition = [CATransition animation];
    transition.duration = 0.4;
    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    transition.type = kCATransitionMoveIn;
    transition.subtype = kCATransitionFromBottom;
    transition.delegate = self;
    [self.navigationControler.view.layer addAnimation:transition forKey:nil];
    [appDelegate.navigationControler obj animated:NO];
     obj = nil;
    

    I hope this solution can help you!

提交回复
热议问题