Learn Courses My Dashboard

Switch tableView


I am trying to chose item from collection and reload new item in tableview so every item in collectionview have its owen items in tableview

For example if u choose Burger from collection cell the table view will show all kind of Burgers

Chicken , beef , fish , vegetarian etc

how can i do this

This test collection app i hopefully u understand my question

Thank u

easiest way to do this is by making multidimensional arrays/dictionary
something like

name: “burger”, items: [“cheese burger”, “chicken burger”],
name: “dessert”, items [“ice cream”, “cake”]

so when an item from the top list is selected, it will refer to the row of that (which has “items” in it).
you can then use “items” to populate/change the data array of the tableview/list