title: Moving UITableView position in Swift
body: <p>I am trying to animate a <code>UITableView</code> so that when the view appears, it slides up from the bottom of the screen. I have tried using loads of different methods from different questions on here, but no suggestions have worked for me. </p>
  
  <p>What I have at the moment is this:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      menuTableView.layer.cornerRadius = 7
  
      menuTableView.delegate = self
      menuTableView.dataSource = self
      view.addSubview(menuTableView)
  
      menuTableView.frame.origin.y = menuTableView.frame.origin.y + menuTableView.frame.height
      // Do any additional setup after loading the view.
  }
  
  override func viewDidAppear(animated: Bool) {
      if (menuTableView.indexPathForSelectedRow() != nil) {
          menuTableView.deselectRowAtIndexPath(menuTableView.indexPathForSelectedRow()!, animated: true)
      }
  
      UIView.animateWithDuration(10, animations: {
          self.menuTableView.frame.origin.y - menuTableView.frame.height
      })
  }
  </code></pre>
  
  <p>Someone suggested adding the <code>UITableView</code> as a subview, so I tried that, but it also doesn't work. The table just stays where it is.</p>
  
  <p>Does anyone know a way that works in Swift?</p>