首页 > 代码库 > 隐藏电池栏,遮罩层
隐藏电池栏,遮罩层
- (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]; }
隐藏电池栏,遮罩层
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。