i have 5 collection view cell with name \"Resturants\", \"shops\", \"Medical\" , \"parlor\" , \"parks\" so on. So now i set like, 10 view controller and i place table view insid
Store category names in an array or elsewhere, anytime cell is pushed you call the certain category by selecting it from the array as follows
categoryArray[indexPath.row]
Then when the transition to another view is about to be done you check what category has been selected and you populate the tableview with relevant data. You can set up a structure like so:
func determineDataSource()
{
switch category
{
case "Restaurant":
print("restaurant")
.
.
.
}