iPhone SDK: How to add an image to a UIBarButton?
Posted
by iPhone Developer
on Stack Overflow
See other posts from Stack Overflow
or by iPhone Developer
Published on 2010-05-27T19:01:24Z
Indexed on
2010/05/27
19:31 UTC
Read the original article
Hit count: 596
iphone-sdk
I have used the code below to create a button on the nav bar with an image.
I can see the image but I can also see the border of the button around it. My question is, how can I get rid of the button border. All I want to see is the image on the nav bar, no border.
UIBarButtonItem *settingsBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_prefs.png"] style:UIBarButtonItemStylePlain target:self action:@selector(openSettings:)];
[[self navigationItem] setLeftBarButtonItem:settingsBtn];
[settingsBtn release];
Thanks in advance. Any pointers, links to read further or examples appreciated.
© Stack Overflow or respective owner