问题
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 multiple selections. I have to pass all the values selected from every table to next webservice.
How can I do this task ?
Thank You,
回答1:
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.
来源:https://stackoverflow.com/questions/5392497/multiple-selection-in-uitableview-and-the-tables-are-dynamically-generated