diff --git a/Signal/src/UIColor+OWS.h b/Signal/src/UIColor+OWS.h index f4c8e9046..b80bde873 100644 --- a/Signal/src/UIColor+OWS.h +++ b/Signal/src/UIColor+OWS.h @@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN + (UIColor *)ows_blackColor; + (UIColor *)ows_errorMessageBorderColor; + (UIColor *)ows_infoMessageBorderColor; ++ (UIColor *)ows_inputToolbarBackgroundColor; + (UIColor *)backgroundColorForContact:(NSString *)contactIdentifier; + (UIColor *)colorWithRGBHex:(unsigned long)value; diff --git a/Signal/src/UIColor+OWS.m b/Signal/src/UIColor+OWS.m index 7693f3750..562888057 100644 --- a/Signal/src/UIColor+OWS.m +++ b/Signal/src/UIColor+OWS.m @@ -86,6 +86,11 @@ NS_ASSUME_NONNULL_BEGIN return [UIColor colorWithRed:239.f / 255.f green:189.f / 255.f blue:88.f / 255.f alpha:1.0f]; } ++ (UIColor *)ows_inputToolbarBackgroundColor +{ + return [self colorWithWhite:245 / 255.f alpha:1.f]; +} + + (UIColor *)ows_lightBackgroundColor { return [UIColor colorWithRed:242.f / 255.f green:242.f / 255.f blue:242.f / 255.f alpha:1.f]; diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index 15195bcc0..4a1bf392f 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -72,7 +72,7 @@ static void *kConversationInputTextViewObservingContext = &kConversationInputTex { self.layoutMargins = UIEdgeInsetsZero; - self.backgroundColor = [UIColor colorWithWhite:245 / 255.f alpha:1.f]; + self.backgroundColor = [UIColor ows_inputToolbarBackgroundColor]; UIView *borderView = [UIView new]; borderView.backgroundColor = [UIColor colorWithWhite:238 / 255.f alpha:1.f]; diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 156b1e948..42996a9ef 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -479,6 +479,13 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { [self loadDraftInCompose]; } +- (void)loadView +{ + [super loadView]; + + self.view.backgroundColor = [UIColor ows_inputToolbarBackgroundColor]; +} + - (void)createContents { _layout = [ConversationViewLayout new]; diff --git a/Signal/src/ViewControllers/NewContactThreadViewController.m b/Signal/src/ViewControllers/NewContactThreadViewController.m index 9bfdd1313..e9d540269 100644 --- a/Signal/src/ViewControllers/NewContactThreadViewController.m +++ b/Signal/src/ViewControllers/NewContactThreadViewController.m @@ -75,6 +75,7 @@ NS_ASSUME_NONNULL_BEGIN { [super loadView]; + self.view.backgroundColor = UIColor.whiteColor; _contactsViewHelper = [[ContactsViewHelper alloc] initWithDelegate:self]; _nonContactAccountSet = [NSMutableSet set]; _collation = [UILocalizedIndexedCollation currentCollation]; diff --git a/Signal/src/ViewControllers/OWSViewController.m b/Signal/src/ViewControllers/OWSViewController.m index 96792b1ca..c2f2b66aa 100644 --- a/Signal/src/ViewControllers/OWSViewController.m +++ b/Signal/src/ViewControllers/OWSViewController.m @@ -110,7 +110,8 @@ NS_ASSUME_NONNULL_BEGIN CGRect keyboardEndFrameConverted = [self.view convertRect:keyboardEndFrame fromView:nil]; // Adjust the position of the bottom view to account for the keyboard's // intrusion into the view. - CGFloat offset = -MAX(0, (self.view.height - keyboardEndFrameConverted.origin.y)); + // We offset by the bottomLayoutGuide for iPhoneX users, else there is an unnecessary gap between the keyboard and input bar. + CGFloat offset = -MAX(0, (self.view.height - keyboardEndFrameConverted.origin.y - self.bottomLayoutGuide.length)); // There's no need to use: [UIView animateWithDuration:...]. // Any layout changes made during these notifications are