Question : How to put a view on the back button of navigation bar?

Hey guys, I am wondering how to put a view on the back button of navigation bar?
Not on title view, but on the back button.
It seems like to me that the back button is a UIBarButtonItem, which doesn't inherite UIView...
Help please!

Thanks!

David

Answer : How to put a view on the back button of navigation bar?

UIBarButtonItem has initWithCustomView.
So if you will create UIButton, then you can write something like:
UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:theUIButtonYouCreated];

http://developer.apple.com/iphone/library/documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html#//apple_ref/occ/instm/UIBarButtonItem/initWithCustomView:

Here you will see a short example:
How to use a custom UIBarButtonItem to display a UIActivityIndicatorView
http://www.leegillen.com/Public/Blog/Entries/2008/10/26_How_to_use_a_custom_UIBarButtonItem_to_display_a_UIActivityIndicatorView.html

Actually this class has initWithImage too.
Random Solutions  
 
programming4us programming4us