How to animate a button change in UINavigationBar?

self.navigationItem.rightBarButtonItem = self.addToOrderButton; 

There are specific methods you can use to animate the right and left bar button items:

 [self.navigationItem setRightBarButtonItem: self.addToOrderButton animated:YES];

…which will animate it for you. If you need everything to animate (including the title) you can also use the setItems:animated: method of your navigation bar (pass it in an array of the navigation items you’d like to display)

Leave a Comment