mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 03:23:23 +00:00
PS-587 - Fix searchbar search textfield and icon colors for dark themes (#1941)
* PS-587 Fix searchbar search textfield and icon colors for dark themes * PS-587 - PR corrections
This commit is contained in:
20
src/iOS.Core/Utilities/UISearchBarExtensions.cs
Normal file
20
src/iOS.Core/Utilities/UISearchBarExtensions.cs
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user