title: How can you use TableView items to access View Controllers in Swift 2?
body: <p>I'm attempting to create my first iOS app that I plan to publish into the App Store. It's a tabbed application with TableView embedded into each View Controller. Here's the code for one of my tabbed View Controllers:</p>
  
  <pre><code>import Foundation
  import UIKit
  
  class AU: UITableViewController {
  
      var textArray = ["001", "002", "003", "004", "005", "006", "007", "008", "009", "010", "011", "012", "013", "014", "015", "016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "028", "029", "030", "031", "032", "033", "034", "035", "036", "037", "038", "039", "040", "041", "042" ]
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("AUCell") as UITableViewCell!
  
          cell.textLabel?.text = textArray[indexPath.row]
  
          return cell
      }
  
      override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return textArray.count
      }
  }
  </code></pre>
  
  <p>So, basically, when the user taps on one of the items in the <code>textArray</code>, I want to switch to a different View Controller. I'm currently writing this in Swift 2.</p>