4

How can I create an UIBarButtonItem without any border, but just a label inside?

EDIT

I tried something like this with no luck:

UIBarButtonItem* langButton = [[UIBarButtonItem alloc] initWithTitle:@"EN"
    style:UIBarButtonItemStylePlain target:self action:@selector(changeLang)];    
self.navigationItem.leftBarButtonItem = langButton;
[langButton release];  
Don Grem
  • 1,257
  • 3
  • 17
  • 25
  • 1
    The only way to set it without borders is with custom button. Is the label going to be changeable? Because if it's not you can make an image of the text you need and create custom button with image. – Spire Nov 28 '11 at 11:34
  • Yes the label is going to be changeable. – Don Grem Nov 28 '11 at 11:36

1 Answers1

3

Do the same as the following guy:

https://stackoverflow.com/a/6817554/59198

But change it so instead of an image button, you'll make a standard textual button.

Community
  • 1
  • 1
Chris
  • 39,719
  • 45
  • 189
  • 235