2

I am trying to hide the navigation bar 'back' button during an animation. When the animation completes, the button re-appears.

my code is as follows:

- (void) animateResults {

    [self hideNavBarButtons];

    [self animatePlayer1];
    [self animatePlayer2];

    [self performSelector:@selector(showNavBarButtons) withObject:nil afterDelay:3.0];


}


- (void) hideNavBarButtons {

    [self.navigationItem setHidesBackButton:YES animated:YES];

}

- (void) showNavBarButtons {

    [self.navigationItem setHidesBackButton:NO animated:YES];

}

This works fine on the simulator... but I get weird results on the device. It is very inconsistent, and stops hiding the 'back' button after a few tries. I am assuming I have some delegates messed up.. but I am lost. Any help is appreciated.

Thanks.

edhnb
  • 2,122
  • 3
  • 24
  • 38

0 Answers0