I currently have a List TableView where I can place check marks on any of the Products in that list. Right now, there is no outlet to handle the check marks. What I'd like to do is once the user places check marks on Product names in that list, press a button which would pass those Products' details over to a new tableview, displaying the details of those Products in开发者_JS百科 a side-by-side column-type of tableview for a side-by-side comparison of the 3 Products' details. I could really use some help on the following and any help provided would be much appreciated.
1) Take the check marks and press a button to send that to a new view. I have no idea how to associate and connect those check marks to a button and then program that button to send the details to a new tableview.
2) Create a new view with a tableview capable of displaying 3 side-by-side columns in a tableview. I have read some about creating tables that appear to have multiple columns, but I'm not exactly sure how this is achieved.
Any help would be much appreciated. Thanks.
I'm not sure about number 2, but here's how I'd handle number 1:
Store the "check mark" as an attribute of each Product object in the array where your first table view is getting its data. Then, when you push the next view controller, populate an array by checking which products have a check mark attribute and adding them to a new array for your second table view's data source.
精彩评论