I have in my only-ios5 application a navigationControllerDelegate:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
UIBarButtonItem *myButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"common-settingsbutton"] style:UIBarButtonItemStylePlain target:nil action:nil];
[viewController.navigationItem setRightBarButtonItem:myButton];
}
It works, but when a push view controller with default animation occurs (i.e. using a "push segue") the rightBarButtonItem fadeout and fadein during animation.
How can I avoid this?
UPDATE
The only workaround I found is:
create UINavigationBar background with same UIBarButtonItems drawn in png (in the same position, same color) and set background correctly based on buttons I need.
Then, of course, add your UIBarButtonItems.
The only workaround I found is: create UINavigationBar background with same UIBarButtonItems drawn in png (in the same position, same color) and set background correctly based on buttons I need. Then, of course, add your UIBarButtonItems.
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