码迷,mamicode.com
首页 > 其他好文 > 详细

presentViewController弹出一个半透明的UIViewController

时间:2015-08-18 14:13:31      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:uiviewcontroller

UIViewController 推出另外一个半透明的UIViewController

    UIViewController *controller = [[UIViewController alloc]init];
    if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) {
        nav.modalPresentationStyle=UIModalPresentationOverCurrentContext;
    }else{
        nav.modalPresentationStyle=UIModalPresentationCurrentContext;
    }
    controller.view.backgroundColor = [UIColor colorWithWhite:.0f alpha:.65f];
    [self presentViewController:controller animated:YES completion:nil];

版权声明:本文为博主原创文章,未经博主允许不得转载。

presentViewController弹出一个半透明的UIViewController

标签:uiviewcontroller

原文地址:http://blog.csdn.net/miaoshichang/article/details/47750407

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!