码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2015-06-26 19:35:33      阅读:170      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!