Segueing to different views from a table?
Segueing to different views from a table?
- Subject: Segueing to different views from a table?
- From: Alex Hall <email@hidden>
- Date: Mon, 12 Oct 2015 16:45:18 -0400
Hello all,
I've set up a couple more table views with navigation controllers and detail views, and it's all working perfectly--thanks to everyone for all the help. Right now, all the cells in a given table segue to the same detail view, but I might have to make a table which could segue to multiple views depending on what data is referenced by the selected row. That is, if table 1's cells all segue to detailView1, and table2's cells to detailView2, that's simple. What if I wanted table3 to be a mix of data, where any row might have to show detailView1 *or* detailView2? There's no way to know in advance which will be which, because the data is randomly generated for now, but will eventually be pulled from a server. Either way, I can't hard-code cell 1 to go to detailView1 and cell 17 to go to detailView2.
I'm guessing the best thing to do is to set each cell's segue in code, when that cell is made? I know what the cell references in the data, so I can just look at the data and determine the segue needed, then set it. Is there a better/recommended way of doing this, or is what I'm planning going to be the best solution? Thanks.
--
Have a great day,
Alex Hall
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden