How to change a UIBarButtonItem in a UINavigationBar

Posted by pkulak on Stack Overflow See other posts from Stack Overflow or by pkulak
Published on 2010-04-03T04:41:18Z Indexed on 2010/04/03 4:43 UTC
Read the original article Hit count: 454

Filed under:
|
|

I'm trying to set up a list of items that can be edited. I have a main view, with a UINavigationBar at the top and a UITableView directly under it. I'd like to have my "edit" button change to a "done" button on click, but I can't figure out how to do it.

If I could do it in the code (not it interface builder), I could just replace it, but I can't even do that. I've seen some code using [self.navigationItem], but in my case self is a UIView.

It also feels a bit odd to be using a UINavigationBar when I don't want navigation (this is one page only), but I want a toolbar with a title and and a button, so I don't think really have a choice.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa