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

最简单的半透明遮罩

时间:2014-11-27 21:53:44      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:io   color   sp   on   bs   ad   nbsp   ui   app   

    CGRect frame = [[UIScreen mainScreen] applicationFrame];//获取窗口大小

    UIView *theView = [[UIView alloc] initWithFrame:frame];//实例一个UIView

    theView.backgroundColor = [UIColor blackColor];//设置其背景色为黑色

    theView.alpha = 0.7;//设置其透明为0.7

    [self.view addSubview:theView];

 

最简单的半透明遮罩

标签:io   color   sp   on   bs   ad   nbsp   ui   app   

原文地址:http://www.cnblogs.com/zhangliukou/p/4127097.html

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