Reputation: 71008
Apple frequently uses a left arrow icon in the their navigation controller "back" button, rather than the word "back" or other text:
It doesn't seem possible to assign an image to this special button with the standard SDK. Am I missing something obvious? If not, what's the most effective way of achieving this? (Can it be done without Photoshopping the whole button in multiple states?)
Thanks.
Upvotes: 4
Views: 811
Reputation: 94794
Create a UIBarButtonItem with the image and assign it as the backBarButtonItem
property of your view controller's navigationItem.
Upvotes: 4
Reputation: 533
You can use -initWithImage:style:target:action:
of UIBarButtonItem
and put your image instead.
- (id)initWithImage:(UIImage *)image
style:(UIBarButtonItemStyle)style
target:(id)target
action:(SEL)action
Upvotes: 1