开发者

Managing rows in view based application

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜