delete button not showing in uitableview
I've added UITableView to a UIViewController. T开发者_如何学Pythonhis ViewController is pushed to a navigationcontroller stack.
I've got an edit button in the tool bar but the delete buttons are not showing up in the cells.
When I hit edit, the edit button switched to a "done" state.
The following tableview method is entered. What would be a likely cause for the delete buttons not showing up?
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
// Prevent new objects being added when in editing mode.
[super setEditing:(BOOL)editing animated:(BOOL)animated];
self.navigationController.navigationItem.rightBarButtonItem.enabled = !editing;
}
精彩评论