Unbalanced calls to begin/end appearance transitions for

前端 未结 25 1096
陌清茗
陌清茗 2020-12-02 06:31

I have this problem when I simulate my app, its not an error or a warning but it appears in my console, has anyone ever experienced this before?

相关标签:
25条回答
  • 2020-12-02 07:01

    In my case I was fetching NSData from NSURL inside 'viewDidLoad' method.

    0 讨论(0)
  • 2020-12-02 07:03

    I got this issue because I was calling a UIPrintInteractionController from a viewController without UITabbar, and neither UINavigationBar. It seems that the UIPrintInteractionController didn't get the correct printInteractionControllerParentViewController. Implementing the method in the delegate and return the current rootViewController worked for me.

        - (UIViewController*)printInteractionControllerParentViewController:(UIPrintInteractionController*)printInteractionController;
    
    0 讨论(0)
  • 2020-12-02 07:03

    The situation can occur if you are adding a view with a modal view controller as a sub view. Best to use:

    -(void) viewDidAppear:(BOOL)animated {
        [self presentViewController:self.yourModalVC animated:YES completion:nil];
    }
    

    It is basically saying the view life cycle is not streamlined for those viewControllers you are trying to display then.

    0 讨论(0)
  • 2020-12-02 07:04

    I have the similar problem when trying to do:

    [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];
    

    in a function like - (void) popUpToLevelTwo; , and to put a return; at the end of function solves the problem

    0 讨论(0)
  • 2020-12-02 07:04

    one solution would be,

    [NSTimer scheduledTimerWithTimeInterval:0.05(or as required) target:self
    selector:@selector(your_selector_method_to_push_the_view) userInfo:nil repeats:NO];
    
    0 讨论(0)
  • 2020-12-02 07:06

    For what it's worth, I got this same error when not including a call to [super viewDidLoad:animated] in my viewDidLoad override.

    0 讨论(0)
提交回复
热议问题