title: How can I Zoom in/out Animation when present UIViewController in Swift 4?
body: <p>I want to present <code>ViewController</code> from button Click with Zoom-In/Out Animation, I try some code but it won't worked for me:</p>
  
  <pre><code>func btnClickView(_ sender: UIButton) {
     let objImagePreview = ImagePreview(nibName: "ImagePreview", bundle: nil)
              let transition = CATransition()
              transition.duration = 1
              transition.type = kCATransitionMoveIn
              transition.subtype = kCATransitionFromTop
              transition.timingFunction = CAMediaTimingFunction(name:kCAMediaTimingFunctionEaseInEaseOut)
              view.window!.layer.add(transition, forKey: kCATransition)
              self.present(objImagePreview, animated: false, completion: nil)
  }
  </code></pre>
  
  <p>I want to animate <code>UIViewController</code> not <code>UIView</code> . I tried so many things but it won't worked for me.</p>