答案 0 :(得分:1)
您可以在Photoshop中为每个iPhone大小制作一个叠加图像,其alpha值为50,然后将该图像添加到UIImageView
CGRect
self.view.frame
的{{1}}中,并控制隐藏和取消隐藏在图片上的UIGestureRecognizer
。
或者您只需制作一张背景色为UIView
的{{1}},然后添加每个人"手"在这个视图中你想要它们的图像。
答案 1 :(得分:1)
喜欢
<强>目标C 强>
// get window screen size for frame
CGRect screensize = [[UIScreen mainScreen] bounds];
//create a new UIview with the same size for same view
UIView* TransprentView = [[UIView alloc] initWithFrame:screensize];
// change the background color to black and the opacity to 0.6 for Transparent
TransprentView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6];
// here add your Label, Image, etc, what ever you want
// add this TransprentView to your main view
[self.view addSubview:TransprentView];
你可以从superview中删除它:
[TransprentView removeFromSuperview];
Swift 2&amp;上述强>
let TransprentView = UIView(frame: UIScreen.mainScreen().bounds)
TransprentView.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.5)
// here add your Label, Image, etc, what ever you want
self.view.addSubview(TransprentView)
你可以从superview中删除它:
TransprentView.removeFromSuperview()