开发者

Managing rows in view based application

开发者 https://www.devze.com 2022-12-14 10:37 出处:网络
I was able to manage rows(add, delete and reorder) of an uitableviewcell in navigation based application, but it is not worki开发者_StackOverflowng in a view based application. The edit button that cr

I was able to manage rows(add, delete and reorder) of an uitableviewcell in navigation based application, but it is not worki开发者_StackOverflowng 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??


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消