您的位置:首页 > 移动开发 > IOS开发

iOS 弹出透明窗体viewcontroller【兼容iOS8以上】

2015-06-26 17:37 711 查看
UIViewController *controller = self.view.window.rootViewController;
controller.modalPresentationStyle = UIModalPresentationCurrentContext;

if (CURRENT_DEVICE >=8.0) {
lockScreenController.modalPresentationStyle = UIModalPresentationOverCurrentContext;
} else {
controller.modalPresentationStyle = UIModalPresentationCurrentContext;
}

[controller presentViewController:lockScreenController animated:YES completion:^{
// 背景色透明
lockScreenController.view.superview.backgroundColor = [UIColor clearColor];
}];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: