I\'ve been trying to learn the new Storyboard feature in Xcode and I\'ve run into a problem with trying to set a UITableView to edit mode.
So far my storyboard looks lik
If you are using the navigation controller to push to the view controller, simply set self.navigationItem.rightBarButtonItem = self.editButtonItem;
, which will put the default Edit button in the right. If the navigation bar is not visible, call self.navigationController.navigationBarHidden = NO;
. Those would be called in the viewDidLoad
method, or something similar. Then in order to get the tableView to respond to the edit call, use the following method:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[tableView setEditing:editing animated:animated];
}
That should do what you want it to do. If you have any issues, just say so and we can narrow down the details