Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIBarButtonItem not flat on iOS 7

just a quick question. I'm updating my company's app for iOS 7 and I'm running into a couple of walls. Right now, the big one is the UIBarButtonItem. When I compile my app against iOS 7 then run the app, I get the old bar buttons.

In short, my bar button looks like this:

enter image description here

Instead of just the text. The application itself was originally coded on iOS 5 so we have been updating it for the last couple of years. Btw, here's how I'm adding the button:

self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonSystemItemDone target:nil action:nil];

Any suggestions or leads will be very much appreciated.

Thanks!

like image 483
Brian Douglas Moakley Avatar asked Oct 01 '13 02:10

Brian Douglas Moakley


3 Answers

That doesn't look like a system button.

Are you sure you are not setting a custom background to the button, maybe using the UIAppearance proxy?

like image 159
Gabriele Petronella Avatar answered Nov 11 '22 17:11

Gabriele Petronella


maybe your have an image like background of your button'

like image 30
Mirko Catalano Avatar answered Nov 11 '22 18:11

Mirko Catalano


Try this :)

UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:nil action:nil];
self.navigationItem.leftBarButtonItem = item;
like image 42
Roger Avatar answered Nov 11 '22 16:11

Roger