问题
Possible Duplicate:
iPhone Multiple Columns in UITableView
Anyone help how to create 2 column tableview in ios?
回答1:
You have to create custom cell view for this task. And add this custom cell in yourTable View.
Check this link for more info Link Link 2
According to your query you just make customButton instead of images and then set image and tagValue
to that button, so whenever you will press button you can identify using tagValue
.
For yourTable Row
bt1.tag = [NSString stringWithFormat:@"%d0",indexPath.row];
bt2.tag = [NSString stringWithFormat:@"%d1",indexPath.row];
and then manipulate this..:)
回答2:
The easiest way to do this is to create two table views and place them side by side. Make yourself the delegate and dataSource of both, and when one is scrolled scroll the other to match pragmatically. This will give the user the impression that the table view has two columns. Then, when figuring out what cells to give to the tables you just need to examine the tableView
argument to determine what is what.
来源:https://stackoverflow.com/questions/13678364/create-2-column-in-uitableview