pure white blur

pull/1/head
Michael Kirk 7 years ago
parent 84d60f5dc4
commit 7ef693f1b5

@ -106,14 +106,13 @@ static void *kConversationInputTextViewObservingContext = &kConversationInputTex
if (UIAccessibilityIsReduceTransparencyEnabled()) { if (UIAccessibilityIsReduceTransparencyEnabled()) {
self.backgroundColor = [UIColor ows_toolbarBackgroundColor]; self.backgroundColor = [UIColor ows_toolbarBackgroundColor];
} else { } else {
self.backgroundColor = [UIColor clearColor];
UIBlurEffect *blurEffect; UIBlurEffect *blurEffect;
if (@available(iOS 10, *)) { // More muted blur effects look gray when overlayed on white.
blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleProminent]; blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
} else {
blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]; // We can make our blur effect more muted by increasing this background alpha.
} self.backgroundColor = [[UIColor ows_toolbarBackgroundColor] colorWithAlphaComponent:0.4];
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
[self addSubview:blurEffectView]; [self addSubview:blurEffectView];
[blurEffectView autoPinEdgesToSuperviewEdges]; [blurEffectView autoPinEdgesToSuperviewEdges];

Loading…
Cancel
Save