第一种方法:
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:effect]; effectView.alpha = 0.9; effectView.frame = CGRectMake(0, 0, bgImageView.frame.size.width, bgImageView.frame.size.height); [bgImageView addSubview:effectView];
第二种方法:
UIToolbar *toolbar = [[UIToolbaralloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; toolbar.barStyle = UIBarStyleDefault; [_backImg addSubview:toolbar];
原文地址:https://www.cnblogs.com/xuzb/p/8669491.html
时间: 2024-11-29 09:34:20