title: Programmatically created dynamic table view controller not being called when accessed by the different static table view controller
body: <p>Although I am basing the static Table View Controller in the storyboards, I am making it access a different dynamic Table View Controller and making different lists spawn based on which option was clicked. There isn't an actual storyboard for the dynmaic Table View Controller but it is programmatically created. The only things that my storyboard for static Table View Controller is connected to are the moving from the main page to this one and a back button to go back.</p>
  
  <p><a href="https://i.stack.imgur.com/jZVNB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jZVNB.png" alt="Storyboards for Reference"></a></p>
  
  <p>I have two different classes: PollSelectorTableViewController and SubPollsTableViewController where the first is the static storyboard and the second one doesn't have a storyboard but is being created based off of what is being selected in PollSelectorTableViewController. The names all match up properly. My code for 
  PollSelectorTableViewController is:</p>
  
  <pre><code>import UIKit 
  
  class PollSelectorTableViewController: UITableViewController {
  override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      print (indexPath)
      switch indexPath.row { //depending on which row is selected, place the indicated array into the SubPollsTableViewController so that it can load a new storyboard table viewer with the indicated values
      case 0: //first row
          let setGunControl: [String] = ["Background Checks", "Gun Shows", "Back"]
          let GVC = SubPollsTableViewController(setPolls: setGunControl)
          self.present(GVC, animated: true, completion: nil)
      case 1: //second row
          let setFavorability: [String] = ["Back"]
          let GVC = SubPollsTableViewController(setPolls: setFavorability)
          self.present(GVC, animated: true, completion: nil)
      case 2: //third row
          let setImmigrationPolicy: [String] = ["Back"]
          let GVC = SubPollsTableViewController(setPolls: setImmigrationPolicy)
          self.present(GVC, animated: true, completion: nil)
      case 3: //fourth row
          let setCenterOfDiseaseControl: [String] = ["Back"]
          let GVC = SubPollsTableViewController(setPolls: setCenterOfDiseaseControl)
          self.present(GVC, animated: true, completion: nil)
      case 4: // fifth row
          let setGlobalWarming: [String] = ["Back"]
          let GVC = SubPollsTableViewController(setPolls: setGlobalWarming)
          self.present(GVC, animated: true, completion: nil)
      case 5: //sixth row
          let setBack: [String] = ["Back"]
          let GVC = SubPollsTableViewController(setPolls: setBack)
          self.present(GVC, animated: true, completion: nil)
      default:
          let setBack: [String] = ["Back"]
          let GVC = SubPollsTableViewController(setPolls: setBack)
          self.present(GVC, animated: true, completion: nil)
      }
    }
  }
  </code></pre>
  
  <p>*I am keeping the other case string arrays as one value "back" just so I can focus on the functionality of the first one. </p>
  
  <p>** I added a print statement to determine if indexPath was being called, but it doesn't seem like the buttons are interactive at all anymore.</p>
  
  <p>The code for SubPollsTableViewController is:</p>
  
  <pre><code>import UIKit
  
  class SubPollsTableViewController: UITableViewController {
  var polls:[String]
      init(setPolls:[String]){
          self.polls = setPolls
          super.init(style: .plain)
  } //set array to array indicated in PollSelectorTableViewController
  
  required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
  }
  override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return polls.count //number of rows in table is the number of values in the array.
  }
  
  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      print(indexPath) //check if indexPath is being assigned
      let cell = UITableViewCell(style: .default, reuseIdentifier: "cell")
      cell.textLabel?.text = polls[indexPath.row] //place each cell name with a specific string in the array
      return cell
  }
  }
  </code></pre>
  
  <p>The PollSelectorTableViewController is not even registering any clicks and the SubPollsTableViewController is not coming up. Also, none of the print statements are being called. What am I doing wrong here? Is it even code related?</p>