- (void)viewDidLoad
{
[super viewDidLoad];
[super viewDidLoad];
self.imageView
= [[UIImageView
alloc]
initWithImage:[UIImage
imageNamed:@"4"]];
self.imageView.frame = self.view.bounds;
self.imageView.frame = self.view.bounds;
/*UIBlurEffectStyleExtraLight,
白色效果
UIBlurEffectStyleLight,
中
UIBlurEffectStyleDark 黑色效果*/
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
self.blurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
self.blurView.frame = self.view.bounds;
//透明度 0透明 1不透明
self.blurView.alpha = 0.3f;
//将毛玻璃效果添加到控件上
[self.imageView addSubview:self.blurView];
//控件添加到视图上
UIBlurEffectStyleDark 黑色效果*/
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
self.blurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
self.blurView.frame = self.view.bounds;
//透明度 0透明 1不透明
self.blurView.alpha = 0.3f;
//将毛玻璃效果添加到控件上
[self.imageView addSubview:self.blurView];
//控件添加到视图上
[self.view
addSubview:self.imageView];
}
961

被折叠的 条评论
为什么被折叠?



