I want to make my viewController to dismiss to an old viewController with animation. But when I use CATransition my viewController and old viewController fades black. Is there any way I can make it not to fade?
let transition = CATransition()
transition.duration = 1.0
transition.type = kCATransitionPush
transition.subtype = kCATransitionFromLeft
view.window!.layer.add(transition, forKey: kCATransition)
self.dismiss(animated: false, completion: nil)
Read more about transition here and try to modify available parameters to achieve required effects.
Good undocumented info about transition available here.
In case you want some good solution - you should prepare custom transition for your screen - check this WWDC video
Alternative fast (but not the best) solution may be manual control of presentation/dismiss in your viewController:
In storyboard don't forget to set you segue parameters as:
And add panGesture to your root view or any additional pan Gesture to top most view, that can be used for pan - in my case - i just add pan to rootView:
Result: