正确效果如图:下面的toolBar应该看不见它下面的View,
避免方法:[self.view addSubView:aSubView];这个aSubView一定不能设置不透明度,应将其设置为ClearCorlor,然后在aSubView中设置BackgroundView,将backgroundView设置透明度
-(void)setupViews{ self.backgroundColor =[UIColor clearColor]; if (_bacgroundView == nil) { _bacgroundView = [[UIView alloc] init]; _bacgroundView.backgroundColor = [UIColor whiteColor]; _bacgroundView.alpha = 0.3; } [self addSubview:_bacgroundView]; }