开发者

Delete a cell from UITableView programmatically

I have a UITableView, when a cell is taped I want to delete it aut开发者_运维知识库omatically (no editing mode).

When it is tapped I can delete that object/data in the dataSource, but then how can I update the TableView, or refresh it so it so it shows the data in the dataSource after I change that data.


You probably want to use the deleteRowsAtIndexPaths:withRowAnimation: method as it's more efficient than reloadData and allows you to animate the deletion.


then you can just do it simply: [self.tableView reloadData];

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜