I'm having trouble with my didSelectRowAt portion of the code.
My menu (so far) has: Workout, Tips, Contact Us. They all have a special UIViewController dedicated to their view. In my didSelectRowAt func, I have a switch case:
UIViewController.swift
switch indexPath.row {
case 0:
// Call Workout View
self.performSegue(withIdentifier: "wrkOut", sender: self)
case 1:
self.performSegue(withIdentifier: "tipsN", sender: self)
workoutView.swift
class workoutview: UIViewController {
override func viewDidLoad() { super.viewDidLoad() }
Keeping in mind "wrkOut" is the title of the Workout view and not a push segue. When I try the code it just displays a black screen when clicked. I tried ctrl dragging a push segue to each view but it can only be directed to one of them.
How can I code this to go to a specific UIViewController when the row is clicked? We have to use push segues for whatever reason.