0

Possible Duplicate:
Creating a left-arrow button (like UINavigationBar's “back” style) on a UIToolbar

I did a highly customized button on navigation bar, which is a back button sometimes but a refresh (in a variety of ways) button some other times. So I had to go with leftBarButtonItem instead of backBarButtonItem. What's a good way to make it look like a "back button" when it serves as one?

Community
  • 1
  • 1
City Techno
  • 151
  • 3
  • 13

1 Answers1

1

You can use the backBarButtonItem when it needs to be a back button. When it changes to a refresh, you can use self.navigationItem.hidesBackButton = YES and then set your own leftBarButtonItem.

If you'd like animation, try:

[self.navigationItem setHidesBackButton:YES animated:YES];
[self.navigationItem setLeftBarButtonItem:desiredBarButtonItem animated:YES];
aopsfan
  • 2,451
  • 19
  • 30