最简单的半透明遮罩
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];