0

How would I implement what is a Master-Detail View with another Detail view after?

So essentially a Master view with a TableView, Detail view with a Table View and then another Detail view with all the information. So you can select an item in the Master View which loads a TableView of items and then each item in that Detail view has its own details.

Basically a list of lists with details for sub-list's items.

Main Menu (multiple items within this list) -items (multiple items within this list) --details (details for each item in the list.

phillipppp
  • 13
  • 4
  • It is similar to this http://stackoverflow.com/questions/15104404/uisplitviewcontroller-with-multiple-detail-view-controller – iphonic Jul 24 '14 at 05:00
  • What have you tried? Do you have a specific question about some part of the process? – rdelmar Jul 24 '14 at 05:20
  • @rdelmar I set up a Master-Detail View template and basically copied the master view into a new TableView Controller and moved the Detail view information to a new UIView. It will run, I can add an item, but when I tap the item, it does not segue to the second Master view. – phillipppp Jul 24 '14 at 19:07
  • @iphonic That example shows just a Master Detail View. I would like to tap an item in the Master View which segues to a view containing another list of items and each of those items has a detail view. – phillipppp Jul 24 '14 at 19:11
  • Could you make a simple drawing to see what you want to achieve exactly? – Akaino Jul 24 '14 at 19:19
  • see here: https://www.dropbox.com/s/9dfp9oxuov3xi60/GroceryListTest.zip – phillipppp Jul 24 '14 at 19:20
  • @Akaino see the link I posted. It may help – phillipppp Jul 24 '14 at 19:24
  • You need to add a segue from your masterView to detailView and add `-performSegueWithIdentifier:` to your cells so that the segue is executed. EDIT: +1 to @rdelmar s answer – Akaino Jul 24 '14 at 19:38

1 Answers1

1

The segues don't fire because you made the segues from the one controller to the next controller. If you do that, you have to call the segue manually with performSegueWithIdentifier:sender:. However the better way is to delete those segues and remake them between the cell and the following controller -- the segue will then happen automatically when you tap the cell. You pass the data in prepareForSegue: using the sender argument (which will be the cell you touched) to get the indexPath and thus an index into the array you use to populate the tables.

rdelmar
  • 103,982
  • 12
  • 207
  • 218