您的位置:首页 > 其它

cell中有一个按钮,点击按钮删除本行cell,并有系统自带的由右向左的效果(效果有多种)

2015-12-30 16:55 113 查看
1.获取相对应的cell

UITableViewCell *cell = [self.tableViewviewWithTag:tage+100];

2.获取cell的indexPath

NSIndexPath * indexPath = [self.tableViewindexPathForCell:cell];

3.先删除数据,再删除本行cell

[dateArrayremoveObjectAtIndex:tage];

[self.tableViewdeleteRowsAtIndexPaths:[NSArrayarrayWithObject:indexPath]withRowAnimation:UITableViewRowAnimationLeft];

[self.tableViewreloadData];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: