My app listens for local notifications and when they fire it pushes a view controller onto the navigation stack.
However if two notifications fire at the exact same time then I have noticed that the viewDidAppear: from the push of the first view controller does not get a chance to execute before the delegate’s didReceiveLocalNotification: gets called with the 2nd notification.
This results in a “”Unbalanced calls to begin/end appearance transitions for…” message in the console and the views not displaying properly.
Is there a way I can make the ViewDidAppear: from the push of the first controller execute before didReceiveLocalNotification: gets invoked for the second time?
Sure. Delay your processing of the second notification until
-viewDidAppear:fires.