From 33ab3a663c7e4c4e87d4aad8396ebe891d25678c Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 29 Jun 2018 17:15:35 -0600 Subject: [PATCH] opaque conversation input toolbar --- .../ConversationView/ConversationInputToolbar.m | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index dc4deddb4..42e6bb423 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -78,7 +78,6 @@ static const CGFloat ConversationInputToolbarBorderViewHeight = 0.5; [self createContents]; } - return self; } @@ -104,7 +103,18 @@ static const CGFloat ConversationInputToolbarBorderViewHeight = 0.5; { self.layoutMargins = UIEdgeInsetsZero; - self.backgroundColor = [UIColor ows_toolbarBackgroundColor]; + if (UIAccessibilityIsReduceTransparencyEnabled()) { + self.backgroundColor = [UIColor ows_toolbarBackgroundColor]; + } else { + // We can mute the blur by making our background color more opaque. + self.backgroundColor = [[UIColor ows_toolbarBackgroundColor] colorWithAlphaComponent:0.6]; + + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]; + UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + [self addSubview:blurEffectView]; + [blurEffectView autoPinEdgesToSuperviewEdges]; + } + self.autoresizingMask = UIViewAutoresizingFlexibleHeight; UIView *borderView = [UIView new];