title: displaying array items in tableview with swift
body: <p>I cannot display elements of an array in a tableview by using swift programming language. I did some research but could not solve the problem. Below, you can see my code and download project as a .zip file from here: <a href="http://1drv.ms/1Ca2hyp" rel="noreferrer">http://1drv.ms/1Ca2hyp</a></p>
  
  <p>I can also give some videos. They're 11 min and 10 sec. long in total</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
  
      @IBOutlet var myTableView: UITableView!
      var cars = [String]()
      var newCar: String = ""
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
          cars = ["BMW","Audi", "Volkswagen"]
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
          return 1
      }
  
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return cars.count
      }
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("myCell", forIndexPath: indexPath) as UITableViewCell
  
          cell.textLabel?.text = cars[indexPath.row]
  
          return cell
      }
  
  }
  </code></pre>