I was able to manage rows(add, delete and reorder) of an uitableviewcell in navigation based application, but it is not working in a view based application. The edit button that created in navigation type application is making it possible to edit. Anyone knows what action method is called when the touch up inside of this navigation button occurs? What is happening on this method is that the provisions for adding, deleting and reordering rows coming up on this action, but i've not written any action method of this. SO is there any similar way in a view based application to do these things??
+1
A:
The UIViewController
is having its setEditing:animated:
method called by that nav bar button. If you're hooking up a regular button, your handler should call that method, and the method should look something like this:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated
{
[super setEditing:editing animated:animated]; // must be called first according to Apple docs
[table setEditing:editing animated:animated];
}
i.e. your controller will tell the table to also go into editing mode.
Shaggy Frog
2009-12-14 18:43:26