In my code I am using presentViewController to call my second viewcontroller
[self presentViewController:secondController animated:YES completion:nil];
When I call I need to show left to right animation (like in navigationController)
I don't want to use the navigationController but I need the animation similar to navigationController in presentViewController...
Add this line of code before presenting view controller
secondController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
secondController.modalPresentationStyle = UIModalPresentationFullScreen;
// Take a look at this enum
typedef enum {
UIModalTransitionStyleCoverVertical = 0,
UIModalTransitionStyleFlipHorizontal,
UIModalTransitionStyleCrossDissolve,
UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;