I'm using presentViewController to change from a view to another without Navigation Controller like:
let HomeView = self.storyboard!.instantiateViewControllerWithIdentifier("HomeView") as! ViewControllerHome
self.presentViewController(HomeView, animated:true, completion: nil)
How to change the transition? I want to the same animation like the Navigation controller.
I can use another transitions, but I don't find the transition I want here is the code I'm using
let HomeView = self.storyboard!.instantiateViewControllerWithIdentifier("HomeView") as! ViewControllerHome
HomeView.modalTransitionStyle = UIModalTransitionStyle.PartialCurl
self.presentViewController(HomeView, animated:true, completion: nil)
The answer of Mehul is correct but you can also do it the way you want it. With the instantiateViewController(withIndentifier: string)
This is how I do it:
let destController = self.storyboard?.instantiateViewController(withIdentifier: "") as! YourViewController
destController.modalTransitionStyle = .flipHorizontal
self.navigationController?.present(destController, animated: true, completion: nil) // OR
let destController = self.storyboard?.instantiateViewController(withIdentifier: "") as! YourViewController
destController.modalTransitionStyle = .flipHorizontal
self.present(destController, animated: true, completion: nil)