iPhone UINavigation Issue - nested push animation can result in corrupted navigation bar

后端 未结 20 1922
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 20:14

I keep getting the following errors:

2011-04-02 14:55:23.350 AppName[42430:207] nested push animation can result in corrupted navigation bar
2011-04-02 14:55         


        
相关标签:
20条回答
  • 2020-11-30 20:37

    I know that this was answered, but it could help others.

    I had the same problem, but it was caused because I was using a bad event for an info button. I was using "UIControlEventAllTouchEvents" and this generated two push of the same view into the navigation controller. The correct event was "UIControlEventTouchUpInside". I'm new to iOS.

    0 讨论(0)
  • 2020-11-30 20:38

    Calling pushViewController before viewDidAppear is unsafe.

    0 讨论(0)
  • 2020-11-30 20:39

    I had the same problem / error message as you did just now, was looking for a solution and ended up at this thread, however, for me I found that the solution is actually having only one animated:YES when doing a nested push (I put animated:YES only for the final push), hope this helps

    cheers.

    0 讨论(0)
  • 2020-11-30 20:40

    1) Perhaps you could try passing the necessary variables as properties before pushing the UIViewController rather than using the init methods with parameters. Most likely you will need these parameters beyond your init method anyway.

    Also, in your initWithCoordinates: method you are missing the parameters. Possibly your custom init methods are a part of the problem.

    2) Just because you mentioned viewDidLoad -- this method is for initialization after a view has loaded . If you create the UIViewController in code, as it seems you do, you should use loadView to set up your subviews.

    0 讨论(0)
  • 2020-11-30 20:40

    My Solution was

    [self performSelector:@selector(moveTo) withObject:nil afterDelay:0.5];

    0 讨论(0)
  • 2020-11-30 20:40

    Don't know about other's. I think most of the People using StoryBoard is facing such Problem. I am using XIB.

    In my case The Problem Was, when I was moving to another view using push, I was also using

     [self.navigationController popViewControllerAnimated:YES];
    

    in the ViewWillDisappear of the current View at the same time. Just remove it and it works fine.

    I was using POP, because of the requirement and the Flow. The Hierarchy was 1 -> 2 ->3

    I was on view 2 and wanted to move to view 3. In that case I encountered this error.

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