Home / IOS Development / ios – Standard and custom push animation for NavigationController

ios – Standard and custom push animation for NavigationController



Inside my app I have one customTransition So I can push one ViewControllerA in a presented ViewControllerB:

let communityVC = self.storyboard?.instantiateViewController(withIdentifier: "CommunityVC") as! CommunityViewController
let navController = UINavigationController(rootViewController: communityVC)
self.present(navController, animated: true, completion: nil)

This works exactly the way I want it to work. However, in another ViewController I simply want it default-push-Animation when you call:

self.navigationController?.pushViewController(ExampleVC, animated: true)

but instead presents it ExampleVC as it is presented and not pushed. How can I get customTransition and defaultsTransition for the same NavigationController?

I hope I made my problem clear. Let me know if you need more information on anything.


Source link