在present加上这个转场动画,取消掉原来的转场动画
CATransition *animation = [CATransitionanimation];
animation.duration = 0.35;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.type = kCATransitionPush;
animation.subtype = kCATransitionFromRight;
[self.view.window.layeraddAnimation:animation forKey:nil];
[self presentViewController:setVC animated:NOcompletion:nil];
在dissmiss加上这个转场动画,取消掉原来的动画效果
CATransition *animation = [CATransition animation];
animation.duration = 0.35;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.type = kCATransitionPush;
animation.subtype = kCATransitionFromLeft;
[self.view.window.layer addAnimation:animation forKey:nil];
[selfdismissViewControllerAnimated:NOcompletion:nil];
然后就和NavCtl的push效果和back效果几乎一致。