user2018711
user2018711

Reputation: 23

Tab bar navigation bug in ios6 app

A bug is affecting my ios6 iPhone app.

Using storyboards, the "top" view controller is a tabbar controller and several of the tabs are controlled with the navigation controller.

When the app first loads, you are at the top level of one of the navigation controllers. You can navigate to the right just fine but "rewinding" to the left does not show the proper slide animation; instead, it appears with no sliding animation. This affects all unwind segues on that navigation controller.

Once you select another tab and come back again, the problem with the animation fixes itself. If you resume the app from the background, it also works fine. The problem is only on the initial launch of the app.

Why is this and how does it get resolved?

Upvotes: 1

Views: 345

Answers (1)

rdelmar
rdelmar

Reputation: 104082

From what I can tell from your question, you're trying to use unwind segues to go backwards through the controllers embedded in a navigation controller. If that's what you're doing, it's wrong. You should delete those unwind segues. You don't need to add any segues or code to do this - the navigation controller takes care of this automatically.

After Edit:

After reviewing your project, the problem was with the custom tab bar controller. You left out calling [super viewDidAppearAnimated:animated] in the viewDidAppear method, and that caused this weird behavior. The reason it goes away after switching tabs, is because viewDidAppear for the tab bar controller is never called again -- only when the app first starts.

Upvotes: 1

Related Questions