title: Issues adding UITableView inside a UIViewController in Swift
body: <p>So I'm attempting to build a single screen app where I start with a UIViewController. On top of that there is a UITextfield, a button, and a UITableView.</p>
  
  <p>Essentially the intended functionality of the app is for a user to type a word into the UITextField, hit a button, and have it show up on the UITableView. </p>
  
  <p>I never have problems doing this when the the button appends the UITextField entries to a UITableViewController on a different screen, but for some reason I'm having problems with a UITableView embedded on the UIViewController... On my storyboard I did link the UITableView as a delegate and datasource of the UIViewController so that shouldn't be the problem. </p>
  
  <p>Any ideas? My code is posted below.</p>
  
  <pre><code>import UIKit
  
  var groupList:[String] = []
  
  class ExistingGroups: UIViewController,  UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource
  {
  
  @IBOutlet weak var addGroup: UITextField!
  
  
  @IBAction func addGroupButton(sender: AnyObject) {
  
      self.view.endEditing(true)
  
      var error = ""
  
      if addGroup.text == "" {
  
          error = "Please enter a Group!"
      } else {
  
          groupList.append(addGroup.text)
  
      }
  
      if error != "" {
  
          var alert = UIAlertController(title:"Error In Form", message: error, preferredStyle: UIAlertControllerStyle.Alert)
          alert.addAction(UIAlertAction(title:"OK", style: .Default, handler: { action in
  
              self.dismissViewControllerAnimated(true, completion:nil)
  
          }))
  
          self.presentViewController(alert, animated:true, completion:nil)
  
      }
  
      addGroup.text = ""
  
  
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
      addGroup.placeholder = "Enter Group Name"
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  override func touchesBegan(touches:NSSet, withEvent event:UIEvent)
  {
      super.touchesBegan(touches, withEvent: event)
      self.view.endEditing(true)
  
  }
  
  func textFieldShouldReturn(textField: UITextField!) -&gt; Bool // called when 'return' key pressed. return NO to ignore.
  {
      textField.resignFirstResponder()
      return true;
  }
  
  func tableView(tableView:UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
      return groupList.count
  }
  
  func numberOfSectionsInTableView(tableView:UITableView) -&gt; Int {
  
      return 1
  }
  
  
  func tableView(tableView:UITableView, cellForRowAtIndexPath indexPath:NSIndexPath) -&gt; UITableViewCell {
  
      var cell:UITableViewCell = tableView.dequeueReusableCellWithIdentifier("groupcell") as UITableViewCell
  
      cell.textLabel?.text = groupList[indexPath.row]
  
  
      return cell
  }
  
  
  
  }
  </code></pre>