In my application I have to present the screen from Top to bottom and I have tried below code its giving the same normal presenting style.
let screen = self.storyboard?.instantiateViewController(withIdentifier: "Screen1p5") as? Screen1p5
let transition = CATransition()
transition.duration = 0.5
transition.type = kCATransitionPush
transition.subtype = kCATransitionFromTop
view.window!.layer.add(transition, forKey: kCATransition)
self.present(screen!, animated: true, completion: nil)
For that you need to set
subtype
ofCATransition
tokCATransitionFromBottom
and for batter animation setanimated
tofalse
withpresent(_:animated:completion:)
.For dismiss set
subtype
ofCATransition
tokCATransitionFromTop
.