When pushing a view controller my toolbar buttons fade out and then in again with the new view. The problem is that i have the same buttons in the next view as the previous so it looks like the buttons do a quick flash when switching screen. My question is if this can be avoided by disable the fade out of toolbar buttons for the navigation controller when pushing to a new view or if the toolbar can be bound to the navigation controller in such a way that it is the same for all views. The last suggestion since i have seen that my navigation bar buttons does not fade out when pushing a new screen.
I'm surprised that nobody answered you. I've just faced this issue, and here's a solution I've found.
Subclass your navigation controller
Override you push/pop methods
-(UIViewController*)popViewControllerAnimated:(BOOL)animated { self.navigationBarHidden = YES; UIViewController *vc = [super popViewControllerAnimated:animated]; self.navigationBarHidden = NO; return vc; } -(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { self.navigationBarHidden = YES; [self pushViewController:viewController animated:animated]; self.navigationBarHidden = NO; }
It did the trick for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With