Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UINavigationController back button not animating

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.

like image 388
Rubs Avatar asked Apr 05 '13 21:04

Rubs


2 Answers

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.

like image 93
Rubs Avatar answered Nov 17 '22 12:11

Rubs


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.

like image 21
abc123 Avatar answered Nov 17 '22 13:11

abc123