IOS78模态半透明弹出框
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IOS78模态半透明弹出框相关的知识,希望对你有一定的参考价值。
//源Controller中跳转方法实现
MKDialogController *controller = [[MKDialogController alloc] init];
controller.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
controller.providesPresentationContextTransitionStyle = YES;
controller.definesPresentationContext = YES;
controller.modalPresentationStyle = UIModalPresentationOverCurrentContext;
[self presentViewController:controller animated:YES completion:nil];
} else {
self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:controller animated:NO completion:nil];
self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationFullScreen;
}
// 只不过跳转后没有动画效果,有待优化
以上是关于IOS78模态半透明弹出框的主要内容,如果未能解决你的问题,请参考以下文章
如何在 iOS 6 中使用 UIPopoverBackgroundView 呈现透明弹出框