最简单的半透明遮罩

    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];

 

posted @ 2014-11-27 20:14  ZLK0011  阅读(129)  评论(0编辑  收藏  举报