隐藏电池栏,遮罩层
Posted 预估计
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了隐藏电池栏,遮罩层相关的知识,希望对你有一定的参考价值。
- (BOOL)prefersStatusBarHidden { return YES;//隐藏为YES,显示为NO }
- (void)tapClick:(UITapGestureRecognizer *)sender { [self.imageView1 removeFromSuperview]; [self.backgroundView removeFromSuperview]; } //imageView1是二维码图片 -(void)downBtnClick{ UIView *backgroundView = [[UIView alloc] init]; self.backgroundView = backgroundView; backgroundView.frame = CGRectMake(0, 0,kScreenWidth,kSCreenHeight); backgroundView.backgroundColor = [UIColor colorWithRed:(40/255.0f) green:(40/255.0f) blue:(40/255.0f) alpha:1.0f]; backgroundView.alpha = 0.7; backgroundView.userInteractionEnabled = YES; UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)]; tap3.numberOfTapsRequired = 1; // 点几下 tap3.numberOfTouchesRequired = 1; // 几根手指 // 2.对某一个需要添加手势的view 添加手势 [backgroundView addGestureRecognizer:tap3]; [self.window addSubview:backgroundView]; [self.window addSubview:self.imageView1]; }
以上是关于隐藏电池栏,遮罩层的主要内容,如果未能解决你的问题,请参考以下文章