Tuesday, April 10, 2012

How can I display a UIBarButtonItem without a border?

In IB I can select a UIBarButtonItem, set it to Plain, Custom and apply an Image and it looks fine in a UIToolbar or UINavigationBar.



When I try to do this in code, I get a border:



backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"arrowBack"] 
style:UIBarButtonItemStylePlain
target:self
action:@selector(backButtonClicked:)];


How can I get a UIBarButtonItem without a border? I want it to be Plain and Custom





No comments:

Post a Comment