[CATransaction begin];
CATransition *transition = [CATransitionanimation];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromBottom;
transition.duration=0.5f;
transition.fillMode=kCAFillModeForwards;
transition.removedOnCompletion=YES;
[[UIApplicationsharedApplication] .keyWindow.layeraddAnimation:transition forKey:@"transition"];
[[UIApplicationsharedApplication] beginIgnoringInteractionEvents];
[CATransactionsetCompletionBlock: ^ {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(transition.duration * NSEC_PER_SEC)),dispatch_get_main_queue(), ^ {
[[UIApplicationsharedApplication] endIgnoringInteractionEvents];
});
}];
[selfpresentModalViewController:content animated:NO];
[CATransaction commit];
此处已经可以实现效果了,可以进项目区试试 下面的是各种跳转的type
animation.type = kCATransitionFade;