I am pushing a UIViewController in a navigation stack using the following code
[UIView animateWithDuration:0.75
animations:^{
In Swift 4:
Push:
UIView.transition(with: (self.navigationController?.view)!, duration: 0.75, options: .transitionFlipFromRight, animations: {
self.navigationController?.popViewController(animated: true)
})
Pop:
UIView.transition(with: (self.navigationController?.view)!, duration: 0.75, options: .transitionFlipFromLeft, animations: {
self.navigationController?.popViewController(animated: true)
})