editButtonItem set but no minus buttons?
Posted
by QAD
on Stack Overflow
See other posts from Stack Overflow
or by QAD
Published on 2009-05-25T09:27:28Z
Indexed on
2010/04/12
14:53 UTC
Read the original article
Hit count: 264
My edit button is placed in viewDidLoad:
self.navigationItem.rightBarButtonItem = self.editButtonItem;
It shows up correctly on the nav bar, and tapping this button indeed change it to Done. However, no minus buttons show up in my table rows. Swiping a row, then tap Delete works, though.
Any ideas?
EDIT 1: Here's how I'm doing:
- (void)loadView {
tableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
tableView.delegate = self;
tableView.dataSource = self;
tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.view = tableView;
}
EDIT 2: My observation is that the edit and minus buttons display fine if my tableview is created in IB (RootViewController). The other two (or three) tableview are created by the aforemention code, so that might be the problem. Guess I'd have to dive in to isEditing, editing and whatnot.
© Stack Overflow or respective owner