7

I'm having a weird issue with a navigation controller's back button animation:

my app has a tab bar control with 3 tabs, one of them has a navigation controller with two subsequent view controllers, the first one just show a master table and the second one details, the problem comes when I tap the back button from the detail view controller, instead of slide back to the master view controller it just pops the view without animation.

I've noticed that if I first go to another tab, and then return again to this one, the animation will trigger normally.

I've rebuilt the whole app navigation from scratch but the problem still persist, any help is appreciated.

Thanks in advance!.

Edit: More info added

This is how my storyboard looks like in that particular branch: enter image description here

Here's the prepareForSegue from "Partidos Activos" view controller:

#pragma mark - Segues -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ if ([segue.identifier isEqualToString:@"PartidosEnDia"]) { PartidosActivosEnFecha *paf = segue.destinationViewController; CalendarCell *senderCell = (CalendarCell *)sender; paf.datos = senderCell.dataDic; } } 

Both viewController viewDidLoad methods are calling super at the start of the method.

As I told before, if I just tap on other tab and then come back to this one, the slide back animation from "Partidos Activos En Fecha" viewController works as expected, it's only when I start the application and go directly to this viewController when the slide back animation doesn't work, and it just gets to the caller viewController without animation.

Hope I added enough info, if not just tell me and I will add it again.

4
  • 2
    I've seen several other problems like this. In at least one of them the problem was having a viewDidLoad or viewDidAppear without a call to super in them. Commented Apr 5, 2013 at 21:58
  • What's your iOS target/test version? Commented Apr 5, 2013 at 22:56
  • Im actually targeting iOS 6, and also checked the calls to super :( Commented Apr 5, 2013 at 23:00
  • You're going to have to provide more detail if you want more help. Did you set these controllers up in code or IB? Are you doing any navigation in code or with segues? Commented Apr 6, 2013 at 0:13

3 Answers 3

12

I finally found where the problem was, I was missing a call to super in the viewDidAppear method but in UITabBarController!, I was checking only viewControllers for the tabs but not the tabbarviewcontroller. @rdelmar was right.

Sign up to request clarification or add additional context in comments.

3 Comments

Click on the checkbox below the Up/Down vote to accept the answer.
My typo was I to call [super viewDidDisappear:animated]; instead of didAppear. Thanks!
Damn, I was about to bang my head on the wall why the hell animation isn't working but found your answer. Helped me a lot!!!
5

I had the exact same problem. The cause for me was an empty viewDidAppear:animated method in my UITabBarController. Once I deleted that method, the animation worked normally again.

Comments

0

I think this it's what you want. If I understand, your problem is handle the stack of the navigation controller right? So, check that link.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.