开发者

Deleting Multiple rows from a TableView [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

iPhone: modifying view when user shakes

hi Frnz,

i want to delete multiple rows from a table view based on users selection.obviously i cant use didSelectRowAtIndexPath method coz it will be called for every row selected. i want to allow user to select multiple rows for deletion and then delete them in one go...Is it possible if yes then how to go about it.Also i am using a single view based project 开发者_StackOverflowand i want the header of table view changed to "Delete" on the same view when the user want to delete the rows from the view.

Thx


You can still use didSelectRowAtIndexPath: but you need to keep a little state for each row selected for deletion. Once you have set the state for each row selected for deletion, and the user triggers the delete all action, you can remove all the rows that have their state set.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜