title: iPhone, iOS 8: How to presentViewController smaller than original view controller?
body: <p>I have two view controllers, I want to present view controller(VC) of the first VC. Second VC have smaller size. I want to show second view controller over the first one. Like a popover. You can imagine it, if we add another view controller that slides from bottom to top but stops at navigation bar.</p>
  <p>Here is my code:</p>
  <pre><code>@IBAction func showSecondVC(sender: AnyObject) {
              
      let secondViewController = storyboard?.instantiateViewControllerWithIdentifier(&quot;SecondViewController&quot;) as! SecondViewController
      
      secondViewController.view.frame = CGRect(origin: CGPoint(x: view.frame.origin.x, y: header.frame.height), size: CGSize(width: view.frame.width, height: view.frame.height - header.frame.height))
  
      secondViewController.definesPresentationContext = true
      secondViewController.providesPresentationContextTransitionStyle = true
      
      secondViewController.modalPresentationStyle = UIModalPresentationStyle.CurrentContext
             
      self.presentViewController(secondViewController, animated: true, completion:nil)
  
  
  }
  </code></pre>
  <p>You can see that I set frame for <code>secondViewController</code>. I want that it will be with this frame, but if I add completion block and show it's frame after animation, it will be same as first View Controller have.</p>
  <h1>Edit</h1>
  <p>I also want to mention, that I try to make this in Portrait orientation.</p>