Can you manually add to an iPhone/iPad Navigation Bar a back button item?

Posted by MikeN on Stack Overflow See other posts from Stack Overflow or by MikeN
Published on 2010-04-17T23:16:11Z Indexed on 2010/04/17 23:23 UTC
Read the original article Hit count: 501

Filed under:
|
|

I have a reference to a "UIBarButtonItem", is there a way I can add a custom "Back Navigation Button" to that item when it is not part of a Navigation based view?

I can add a left button:

UIBarButtonItem *backButton = [[UIBarButtonItem alloc] 
initWithTitle:@"Custom Back" 
style:UIBarButtonItemStylePlain target:self
action:@selector(backAction:)];

menuItem.backBarButtonItem = backButton; //This doesn't seem to work.

menuItem.popOverNavigationItem.leftBarButtonItem = backButton; //This shows a normal button

So how could I make the leftmost button look like a back navigation button?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipad