开发者

How to delete a custom tableview cell? [duplicate]

开发者 https://www.devze.com 2023-03-18 10:07 出处:网络
This question already has an answer here: Smooth reload of uitableview data when rows are deleted (1 answer)
This question already has an answer here: Smooth reload of uitableview data when rows are deleted (1 answer) Closed 8 years ago.

i am using custom cell in uitableview cell.I am giving button on the right of the navigation bar .if user click on the butto开发者_如何学编程n the delete cell option has to come like default cell delete option...can any one share code ...thanks in advance....


To delete a UITableViewCell, you should remove the data from the Array that populated the tableview. You can remove it using any logic, and the value of the row returned from the touch.

After that, a simple [tableView reloadData]; will do the trick.


Whenever you click the button corresponding the custom cell you should move the data of the next concurrent cells to their previous cell and then call [reloadData]


check this may help

0

精彩评论

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

关注公众号