0

I am trying to implement push and pop animation of VC with style .pageSheet for UINavigationoController as a full copy of .present animation, but can't understand how to achieve this animation effect. I had looked at <ios animations by tutorials 6th edition> book and a few examples one of these is Navigation controller custom transition animation, and I saw that this is complex animation, and I can't achieve this effect fully, because right now I can only achieve the effect of animation frame but can't stop animation like in the style of .pageSheet, example of animation which I want to add to push and pop enter image description here

I also tried to use a trick for a presentation from the bottom but I can't stop this animation like on a picture, when last VC above other

let transition:CATransition = CATransition()
        transition.duration = 2.0
        transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
        transition.type = CATransitionType.moveIn
        transition.subtype = CATransitionSubtype.fromTop
        
        source?.navigationController?.view.layer.add(transition, forKey: kCATransition)
        source?.navigationController?.pushViewController(vc, animated: true)

Also, I can open VC as I want using this example of push animation How to change the Push and Pop animations in a navigation based app by Fattie, but it is just opening from bottom to top without effect as in the picture

Do you know if maybe exist some tricks or default settings without the capability to write my own implementation of this animation for push and pop animations?

I want to achieve effect after opening as in the picture for pop and push animation

Ice
  • 680
  • 1
  • 10
  • 23

0 Answers0