diff --git a/SignalMessaging/Views/OWSSearchBar.m b/SignalMessaging/Views/OWSSearchBar.m index 2dec4dd31..e3813290a 100644 --- a/SignalMessaging/Views/OWSSearchBar.m +++ b/SignalMessaging/Views/OWSSearchBar.m @@ -69,12 +69,12 @@ NS_ASSUME_NONNULL_BEGIN if (Theme.isDarkThemeEnabled) { UIImage *clearImage = [UIImage imageNamed:@"searchbar_clear"]; - [self setImage:[clearImage templatedWithColor:foregroundColor] + [self setImage:[clearImage asTintedImageWithColor:foregroundColor] forSearchBarIcon:UISearchBarIconClear state:UIControlStateNormal]; UIImage *searchImage = [UIImage imageNamed:@"searchbar_search"]; - [self setImage:[searchImage templatedWithColor:foregroundColor] + [self setImage:[searchImage asTintedImageWithColor:foregroundColor] forSearchBarIcon:UISearchBarIconSearch state:UIControlStateNormal]; } else { diff --git a/SignalMessaging/utils/UIImage+OWS.swift b/SignalMessaging/utils/UIImage+OWS.swift index e77a27e7b..360543f88 100644 --- a/SignalMessaging/utils/UIImage+OWS.swift +++ b/SignalMessaging/utils/UIImage+OWS.swift @@ -20,7 +20,7 @@ extension UIImage { } @objc - public func templated(color: UIColor) -> UIImage? { + public func asTintedImage(color: UIColor) -> UIImage? { let template = self.withRenderingMode(.alwaysTemplate) let imageView = UIImageView(image: template) imageView.tintColor = color diff --git a/SignalMessaging/utils/UIUtil.m b/SignalMessaging/utils/UIUtil.m index de67335fb..c925d9625 100644 --- a/SignalMessaging/utils/UIUtil.m +++ b/SignalMessaging/utils/UIUtil.m @@ -41,9 +41,6 @@ // ? UIKeyboardAppearanceDark // : UIKeyboardAppearanceDefault); - // [[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTintColor:[UIColor - // ows_materialBlueColor]]; - [[UISwitch appearance] setOnTintColor:[UIColor ows_materialBlueColor]]; [[UIToolbar appearance] setTintColor:[UIColor ows_materialBlueColor]];