hi Im having trouble bluring my UIView. I'm able to get te UIView to show a Translucent one and have the user be able to change it but cant figure out how to blur it. I'm pretty sure that I will need the view to use UIVisualEffectView & UIBlurEffect but can't figure out how to get my view to use the instead of setBackgroundColor.
self.diaryPlayerView = [UIView new];
[[self diaryPlayerView] setBackgroundColor:[UIColor colorWithRed:0.10 green:0.10 blue:0.10 alpha:[mediaPlayerBackgroundAmountValue doubleValue]]];
[[self diaryPlayerView] setHidden:YES];
[self addSubview:[self diaryPlayerView]];
[[self diaryPlayerView] setTranslatesAutoresizingMaskIntoConstraints:NO];
[NSLayoutConstraint activateConstraints:@[
[self.diaryPlayerView.topAnchor constraintEqualToAnchor:self.topAnchor],
[self.diaryPlayerView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
[self.diaryPlayerView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
[self.diaryPlayerView.heightAnchor constraintEqualToConstant:140 + [mediaPlayerOffsetValue doubleValue]],
]];
EDIT
I did the following and the view is only translucent and not blurring like expected
self.diaryPlayerView = [UIView new];
self.MediaPlayerblurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemUltraThinMaterialDark];
self.MediaPlayerEffectView = [[UIVisualEffectView alloc] initWithEffect:MediaPlayerblurEffect];
[[self diaryPlayerView] setBackgroundColor:[UIColor colorWithRed:0.10 green:0.10 blue:0.10 alpha:[mediaPlayerBackgroundAmountValue doubleValue]]];
[[self diaryPlayerView] setHidden:YES];
[self addSubview:[self diaryPlayerView]];
[self addSubview:[self MediaPlayerEffectView]];
[[self diaryPlayerView] setTranslatesAutoresizingMaskIntoConstraints:NO];
[NSLayoutConstraint activateConstraints:@[
[self.diaryPlayerView.topAnchor constraintEqualToAnchor:self.topAnchor],
[self.diaryPlayerView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
[self.diaryPlayerView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
[self.diaryPlayerView.heightAnchor constraintEqualToConstant:140 + [mediaPlayerOffsetValue doubleValue]],
]];