title: Button to Add Cell with textField Text to Table Xcode/Swift 2.0
body: <p>My question relates specifically to the following set of actions: I would like a user to be able to input text into a textField, press a button, then have that text transferred into a cell that is then newly populated in a table. </p>
  
  <p>I have one view controller with a text field, button, and table objects. I also have an array that stores each string as the user enters the text, and my code looks as follows: </p>
  
  <p>UPDATE 1: added "self.taskTable.delegate = self" and "self.taskTable.dataSource = self" as suggested in the comments. </p>
  
  <p>UPDATE 2: forgot to add the identifier in the Storyboard editor, code is now functional, thank you everyone! The code is now as follows:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
  @IBOutlet var textField: UITextField!
  @IBOutlet var taskTable: UITableView!
  var taskArray : NSMutableArray! = NSMutableArray() //Could be a non-NS as well
  
  @IBAction func addTask(sender: AnyObject) {
      //Print to alert we entered method
      print("task submitted")
      //Get input from text field
      let input = textField.text
      //Add object to array, reload table
      self.taskArray.addObject(input!)
      self.taskTable.reloadData()
  }//addTask
  
  override func viewDidLoad() {
      super.viewDidLoad()
      self.taskTable.delegate = self
      self.taskTable.dataSource = self
      print("application finished loading")
      // Do any additional setup after loading the view, typically from a nib.
  }
  
  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 self.taskArray.count;
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let cell:UITableViewCell = self.taskTable.dequeueReusableCellWithIdentifier("cell")!
      cell.textLabel?.text = self.taskArray.objectAtIndex(indexPath.row) as? String
      return cell
      }
  }
  </code></pre>