Dealing with an edit button for a UINavigationController / UITableViewController

78 views
Skip to first unread message

Sukima

unread,
Nov 18, 2009, 5:40:57 AM11/18/09
to iPhone Application Development Auditors
So when you create a default UITableView based application in the
RootViewCVontroller under the viewDidLoad method the comments say to
uncomment the following line to make an edit button:

self.navigationItem.leftBarButtonItem = self.editButtonItem;

This works great. However if I then attempt to push another
ViewController onto the stack I loose my back button as usual:

[self.navigationController pushViewController:myNewViewController
animated:YES];

How do I get that back and only have an edit button while viewing the
RootViewController? I should note that the navigation to pop back up
the stack works you just can't _see_ the button but you can click on
it.

Also I notice that when I use the edit button and place the table in
edit mode the delete icons will overlap the imageView that the cells
have on them. Is there a way to fix this? (Here is my screen shot:
http://imagebin.ca/view/UqljZARl.html)

Thanks.

Sukima

unread,
Nov 19, 2009, 2:52:33 AM11/19/09
to iPhone Application Development Auditors
Well I just answered the first part. Turns out I wasn't setting the
title attribute to the view controllers. Once I set the title
attributes it all worked.

Still haven't figured out how to fix the graphical overlap issue.

Thanks.
Reply all
Reply to author
Forward
0 new messages