Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

iOS Tint Color

$
0
0

Is it possible to set the tint color for the iOS version of an application?

With the following code I have a namespace named Static with a default Xamarin.Forms color defined. I'm trying to run this in my App delegate.

global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());

// Set the tint color
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
    var tintColor = Static.ColorResources.TintColor;
    UIApplication.SharedApplication.KeyWindow.TintColor = UIColor.FromRGB((nfloat)tintColor.R, (nfloat)tintColor.G, (nfloat)tintColor.B);
}

When I run this UIApplication.SharedApplication.KeyWindow is null.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>