diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs index a9af856f..8c54702f 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs @@ -106,9 +106,17 @@ namespace Xamarin.Forms.Platform.iOS return; if (_defaultTintColor == null) - _defaultTintColor = Control.BarTintColor; + { + if (Forms.IsiOS7OrNewer) + _defaultTintColor = Control.BarTintColor; + else + _defaultTintColor = Control.TintColor; + } - Control.BarTintColor = color.ToUIColor(_defaultTintColor); + if (Forms.IsiOS7OrNewer) + Control.BarTintColor = color.ToUIColor(_defaultTintColor); + else + Control.TintColor = color.ToUIColor(_defaultTintColor); if (color.A < 1) Control.SetBackgroundImage(new UIImage(), UIBarPosition.Any, UIBarMetrics.Default); |