如何使视图模糊,就像在IOS 8中一样?
- 论坛
- 如何使视图模糊,就像在IOS 8中一样?
9 浏览
匿名的
0 Comments
问题出现的原因:用户想要在iOS 8中实现视图模糊效果。
解决方法:
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
[blurEffectView setFrame:self.view.bounds];
[self.view addSubview:blurEffectView];