I have multiple objects, each with a series of attributes. I’d like the user to select two objects and then the app will display a comparison of the respective object’s attributes. I’m having difficulty deciding how best to select the two objects. I would use a UITableView, but how to select two cells before proceeding? Alternatively, I could display UIButtons, but again, how best to select two before proceeding? Perhaps there is another way that isnt occuring to me.
Ideas appreciated.
Make sure your tableView allows selections:
myTableView.allowsSelection = YES;Define two properties two store the first and second selection index paths:
Set the selection whenever the user selects a row. In this example, I use FIFO approach to the selections. In addition, if there are two selections already made, show the object attributes:
Finally, use a checkmark accessory on the selected rows: