首页 > 移动平台 > 详细

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

时间:2015-06-26 19:32:22      阅读:261      评论:0      收藏:0      [点我收藏+]
    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];
    }];

 

 

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

原文:http://www.cnblogs.com/swu-luo/p/4602869.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!