开发者

Multiple selection in UITableView. And the tables are dynamically generated

开发者 https://www.devze.com 2023-02-18 19:49 出处:网络
I have multiple uitableviews. I created the multiple tables by using a loop. The number of tables depend on the result of the webservice.

I have multiple uitableviews.

I created the multiple tables by using a loop.

The number of tables depend on the result of the webservice.

And each table have mu开发者_如何学JAVAltiple selections. I have to pass all the values selected from every table to next webservice.

How can I do this task ?

Thank You,


1-> you can use check Boxes for in your UITableView for mutli section (Check box can be implemented by UIButton). one check box per row.

2-> Use a flag (BOOL isSelected),set it true when user select a cell (tableView:didSelectRowAtIndexPath:),and make it false for next touch,

for second approach you could use a custom UITableViewCell and use a image to show cell selection to the user (image can be changed by using isSelected value in tableView:didSelectRowAtIndexPath: method.

0

精彩评论

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