开发者

how to make UITableViewCellEditingStyleInsert button call insertNewObject

开发者 https://www.devze.com 2023-01-18 06:41 出处:网络
I add a cell to th开发者_JAVA技巧e end of a section when in editing mode and I give it UITableViewCellEditingStyleInsert. how do I set what function that button calls?Use this method of UITableView:

I add a cell to th开发者_JAVA技巧e end of a section when in editing mode and I give it UITableViewCellEditingStyleInsert. how do I set what function that button calls?


Use this method of UITableView:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if(indexPath.row == editStyleRowInd){
        //any actions here
    }
}

Where editStyleRowInd index of last row in the table

0

精彩评论

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