title: Push Up View Controller from Bottom using Swift
body: <p>I would like to push a view controller using Swift and animate it so it appears from the bottom and moves up. I have the following code to push my view controller:</p>
  
  <pre><code>let helloTableViewController = self.storyboard!.instantiateViewControllerWithIdentifier("helloTableViewController") as! HelloTableViewController
  self.navigationController!.pushViewController(helloTableViewController, animated: true)
  </code></pre>
  
  <p>I have found the following from <a href="https://stackoverflow.com/questions/11879699/load-a-navigation-viewcontroller-from-bottom">another question</a> but cannot seem to get it to work in Swift:</p>
  
  <pre><code>CATransition *animation = [CATransition animation]; 
  [animation setDuration:2]; 
  [animation setType:kCATransitionPush]; 
  [animation setSubtype:kCATransitionFromTop]; 
  [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; 
  SecondView *sObj=[[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
  [self.navigationController pushViewController:sObj animated:YES];
  [[sObj.view layer] addAnimation:animation forKey:@"SwitchToView1"];
  </code></pre>