diff --git a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift index b25b02dc6..b91a3becf 100644 --- a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift @@ -1398,7 +1398,6 @@ class CaptionView: UIView { placeholderTextView.isEditable = false placeholderTextView.backgroundColor = .clear - placeholderTextView.keyboardAppearance = Theme.keyboardAppearance placeholderTextView.font = UIFont.ows_dynamicTypeBody placeholderTextView.textColor = Theme.darkThemePrimaryColor @@ -1411,7 +1410,7 @@ class CaptionView: UIView { private lazy var textView: UITextView = { let textView = UITextView() textView.backgroundColor = .clear - textView.keyboardAppearance = Theme.keyboardAppearance + textView.keyboardAppearance = Theme.darkThemeKeyboardAppearance textView.font = UIFont.ows_dynamicTypeBody textView.textColor = Theme.darkThemePrimaryColor textView.tintColor = Theme.darkThemePrimaryColor @@ -1711,7 +1710,7 @@ class MediaMessageTextToolbar: UIView, UITextViewDelegate { private func buildTextView() -> UITextView { let textView = MessageTextView() - textView.keyboardAppearance = Theme.keyboardAppearance + textView.keyboardAppearance = Theme.darkThemeKeyboardAppearance textView.backgroundColor = .clear textView.tintColor = Theme.darkThemePrimaryColor diff --git a/SignalMessaging/appearance/Theme.h b/SignalMessaging/appearance/Theme.h index b2380518f..1f3315350 100644 --- a/SignalMessaging/appearance/Theme.h +++ b/SignalMessaging/appearance/Theme.h @@ -54,6 +54,7 @@ extern NSString *const ThemeDidChangeNotification; @property (class, readonly, nonatomic) UIColor *searchFieldBackgroundColor; @property (class, readonly, nonatomic) UIBlurEffect *barBlurEffect; @property (class, readonly, nonatomic) UIKeyboardAppearance keyboardAppearance; +@property (class, readonly, nonatomic) UIKeyboardAppearance darkThemeKeyboardAppearance; #pragma mark - diff --git a/SignalMessaging/appearance/Theme.m b/SignalMessaging/appearance/Theme.m index e7008e5e3..9313f8478 100644 --- a/SignalMessaging/appearance/Theme.m +++ b/SignalMessaging/appearance/Theme.m @@ -161,9 +161,15 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled"; + (UIKeyboardAppearance)keyboardAppearance { - return Theme.isDarkThemeEnabled ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault; + return Theme.isDarkThemeEnabled ? self.darkThemeKeyboardAppearance : UIKeyboardAppearanceDefault; } ++ (UIKeyboardAppearance)darkThemeKeyboardAppearance; +{ + return UIKeyboardAppearanceDark; +} + + #pragma mark - Search Bar + (UIBarStyle)barStyle