码迷,mamicode.com
首页 > 其他好文 > 详细

隐藏电池栏,遮罩层

时间:2017-06-27 18:46:52      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:uicolor   oms   return   pcl   rom   make   tap   code   window   

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

 

隐藏电池栏,遮罩层

标签:uicolor   oms   return   pcl   rom   make   tap   code   window   

原文地址:http://www.cnblogs.com/yyyyyyyyqs/p/7086432.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!