Unbalanced calls to begin/end appearance transitions for

后端 未结 22 1945
长情又很酷
长情又很酷 2020-11-28 19:23

I read SO about another user encountering similar error, but this error is in different case.

I received this message when I added a View Controller initially:

22条回答
  •  攒了一身酷
    2020-11-28 20:10

    I had the same error. I have a tab bar with 3 items and I was unconsciously trying to call the root view controller of item 1 in the item 2 of my tab bar using performSegueWithIdentifier.

    What happens is that it calls the view controller and goes back to the root view controller of item 2 after a few seconds and logs that error.

    Apparently, you cannot call the root view controller of an item to another item.

    So instead of performSegueWithIdentifier

    I used [self.parentViewController.tabBarController setSelectedIndex:0];

    Hope this helps someone.

提交回复
热议问题