I have three view controllers that are arranged like snapchat. The main is embedded in a UINavigationController and is in the middle with a view controller on the left and one on the right. The transition works well, the left/right animation. But in snapchat when you switch to a controller next to the camera or vis versa, the camera will stay visible(not tinted black) on the custom segue. WITH MINE, if I push the second view controller on the stack, the first view controller seems to fade to black as the animation starts when I want it to stay fully visible. Im guessing I have to change something in my custom segue.
@implementation toTheRight
- (void) perform{
UIViewController *sourceViewController = (UIViewController *)self.sourceViewController;
UIViewController *destinationViewController = (UIViewController *)self.destinationViewController;
CATransition *transition = [CATransition animation];
transition.duration = .5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
[sourceViewController.navigationController.view.layer addAnimation:transition forKey:kCATransition];
[sourceViewController.navigationController pushViewController:destinationViewController animated:NO];
}