diff --git a/src/iOS.Autofill/LoginSearchViewController.cs b/src/iOS.Autofill/LoginSearchViewController.cs index 28a73e86d..978636115 100644 --- a/src/iOS.Autofill/LoginSearchViewController.cs +++ b/src/iOS.Autofill/LoginSearchViewController.cs @@ -33,10 +33,7 @@ namespace Bit.iOS.Autofill CancelBarButton.Title = AppResources.Cancel; SearchBar.Placeholder = AppResources.Search; SearchBar.BackgroundColor = SearchBar.BarTintColor = ThemeHelpers.ListHeaderBackgroundColor; - if (!ThemeHelpers.LightTheme) - { - SearchBar.KeyboardAppearance = UIKeyboardAppearance.Dark; - } + SearchBar.UpdateThemeIfNeeded(); TableView.RowHeight = UITableView.AutomaticDimension; TableView.EstimatedRowHeight = 44; diff --git a/src/iOS.Core/Utilities/UISearchBarExtensions.cs b/src/iOS.Core/Utilities/UISearchBarExtensions.cs new file mode 100644 index 000000000..02529fd1e --- /dev/null +++ b/src/iOS.Core/Utilities/UISearchBarExtensions.cs @@ -0,0 +1,20 @@ +using UIKit; + +namespace Bit.iOS.Core.Utilities +{ + public static class UISearchBarExtensions + { + public static void UpdateThemeIfNeeded(this UISearchBar searchBar) + { + if (!ThemeHelpers.LightTheme) + { + searchBar.KeyboardAppearance = UIKeyboardAppearance.Dark; + if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0)) + { + searchBar.SearchTextField.TextColor = UIColor.White; + searchBar.SearchTextField.LeftView.TintColor = UIColor.White; + } + } + } + } +} diff --git a/src/iOS.Core/iOS.Core.csproj b/src/iOS.Core/iOS.Core.csproj index 044539d7a..0bb092e46 100644 --- a/src/iOS.Core/iOS.Core.csproj +++ b/src/iOS.Core/iOS.Core.csproj @@ -194,6 +194,7 @@ +