In my case, this error occurs when you click two tabs in a tableview very fast.
The result causes wrong titlename, back button disappear. Someone mentioned that when you push a view, set animated:NO. The error will disappear but still causes some strange behavior. It pushes two views, then you need to back twice to get back the tableview screen.
Method I tried in order to resolve this problem:
add BOOL cellSelected;
in viewWillAppearcellSelected = YES;
in didselectcell delegate if (cellSelected){cellSelected = NO; do action ; }
This helps prevent clicking two different cells very fast.
I had the same issue using navigation controller and push other controllers to it.
I tried to use Buffered Navigation Controller and several other approaches, but it didn't work for me. After spending some time for figuring it out I noticed that this issue occurs if you trying to push new view controller while previous transaction (animation) in progress (about 0.5 sec duration I guess). Anyway, I made quick solution with delegating navigation controller and waiting for previous animation finishes.
In my case it happened when I triggered [self performSegueWithIdentifier:@"SomeIdentifier" sender:self]; within a UINavigationController item's viewDidLoad method.
Moving it into the viewDidAppear method solved the problem.
The reason very likely is that in viewDidLoad not all of the fancy animations have already been finished, whereas in viewDidAppear everything's done.
i have same problem when i used navigationcontroller's pop method
In my app i use a separate logic for navigation controller,So avoided the use of navigation bar and it is always hidden. Then i use a custom view and notification for handling the backbutton and it's events. notification observers are registered and and not removed. So the notification fires twice, and it creates the above mentioned error. Check your code throughly for getting such fault's
I also had this problem when I tapped a button from a NIB. It turns out I had accidentally wired the button to send an event to two IBAction methods, each of which did a pushViewController:animated:
'Unbalanced calls to begin/end appearance transitions for '
Says an animation is started before the last related animation isn't done. So, are you popping any view controller before pushing the new one ? Or may be popping to root ? if yes try doing so without animation i.e. [self.navigationController popToRootViewControllerAnimated:NO];
And see if this resolves the issue, In my case this did the trick.
I had some logic implemented to wait pushing the UIViewController until all data was downloaded. There was an error in this logic which caused to push the UIViewController too early while there was still another API call in progress.
It caused the same UIViewController to be pushed twice by the UINavigationController and gave this warning.
Ensure that you do not forget to in -viewWillAppear, -viewDidAppear, -viewDidLoad, -viewWillDisappear, -viewDidDisappear to call proper super method in your overload of that methods.
For example in my case I mismatched method name like this:
You can run into this if you try to dismiss a UIViewController before it is finished loading.
I had this message in the console and was focusing entirely on the UIViewController that was presenting the new UIViewController, without success. I finally discovered the problem was in the UIViewController I was presenting was dismissing itself because the user wasn't logged into their account.
in my window root navigation controller.
then a child navigation controller complained when pushing another view controller with the above mentioned warning.
The warning wasn't the worst,
the big problem was, that there the delegate of the child navigation controller weren't called anymore.
weired.
Reason For message: This message get displayed if and only if you are pushing/presenting another View controller from viewWillAppear,loadView,init or viewDidLoad method of current View Controller
Way to Remove error Message: Move your pushing/presenting code to viewDidAppear method will solve the issue
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.
Nav Controller -> VC1 -Push--> VC2 -PopOver or Modal Segue--> VC3.
VC3 is unwinding back to VC1.
When the Segue from VC2 to VC3 is PopOver and Modal, the unwind ends in a warning: Unbalanced calls to begin/end appearance transitions for UIViewController"
If the Segue from VC to VC is push, the warning is gone.
[Solution]
It would be great if the unwind logic would take care of this. Maybe it's a bug, maybe not. Either way, the solution is to make VC2 (The controller that has the popup) the target of the rewind, then wait for it to finish appearing before popping up the nav controller. That ensures the rewind (reverse popup) animation has enough time to finish before moving further back. Even with the animations off, it still has to wait or else you get the error.
Your code for VC2 should be as follows. (Swift)
class VC2: UIViewController {
private var unwind = false
@IBAction func unwindToVC1(segue:UIStoryboardSegue) {
unwind = true
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
if unwind {
self.navigationController?.popViewControllerAnimated(false)
}
}
}