Commit 2ca6978f216608e9d28adf055a06a9b6c357039a
1 parent
8761c28d
高斯模糊改毛玻璃
Showing
1 changed file
with
6 additions
and
4 deletions
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCPlayerLoadingView.m
| @@ -21,6 +21,11 @@ | @@ -21,6 +21,11 @@ | ||
| 21 | if (self) { | 21 | if (self) { |
| 22 | self.backgroundColor = [UIColor whiteColor]; | 22 | self.backgroundColor = [UIColor whiteColor]; |
| 23 | [self addSubview:self.bgImageView]; | 23 | [self addSubview:self.bgImageView]; |
| 24 | + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; | ||
| 25 | + UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; | ||
| 26 | + effectView.frame = self.bounds; | ||
| 27 | + [self.bgImageView addSubview:effectView]; | ||
| 28 | + effectView.alpha = .9f; | ||
| 24 | } | 29 | } |
| 25 | return self; | 30 | return self; |
| 26 | } | 31 | } |
| @@ -28,10 +33,7 @@ | @@ -28,10 +33,7 @@ | ||
| 28 | - (UIImageView *)bgImageView { | 33 | - (UIImageView *)bgImageView { |
| 29 | if (!_bgImageView) { | 34 | if (!_bgImageView) { |
| 30 | 35 | ||
| 31 | - NSString *path = [[NSBundle mainBundle] pathForResource:@"UGCLoading" ofType:@"jpeg"]; | ||
| 32 | - UIImage *image = [UIImage imageWithContentsOfFile:path]; | ||
| 33 | - UIImage *blurImage = [UIImage boxblurImage:image withBlurNumber:0.6]; | ||
| 34 | - _bgImageView = [[UIImageView alloc] initWithImage:blurImage]; | 36 | + _bgImageView = [[UIImageView alloc] init]; |
| 35 | _bgImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); | 37 | _bgImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); |
| 36 | _bgImageView.contentMode = UIViewContentModeScaleAspectFill; | 38 | _bgImageView.contentMode = UIViewContentModeScaleAspectFill; |
| 37 | _bgImageView.clipsToBounds = YES; | 39 | _bgImageView.clipsToBounds = YES; |