Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 20348 [details]
After I updated to XF 2.3.4-pre5
XF/iOS's Global Tint color does not effect to DisplayAlert nor DisplayActionSheet.
So, my text color of DisplayAlert and DisplayActionSheet is set as blue color (which is default tint color).
It worked fine on XF184.108.40.206 with same Xamarin.iOS version which is latest.(Version: 10.4.0.123)
below code is my code that changes global tint color in AppDelegate.cs
LoadApplication (new App ());
bool result = base.FinishedLaunching(app, options);
UIApplication.SharedApplication.KeyWindow.TintColor = AppConstants.GlobalColor.ToUIColor();
Below code does not work either.
UIAlertView.Appearance.TintColor = mycolor;
UIActionSheet.Appearance.TintColor = mycolor;
attached sample project reproduces this bug.
I was able to reproduce this issue with the attached repro project and Forms 2.3.4-pre5. It is ignoring the UIApplication.SharedApplication.KeyWindow.TintColor set in AppDelegate and using the default color instead.
This does appear to be a regression as the issue does not occur with Forms 220.127.116.11.
### Regression Status
Forms 2.3.4-pre5 BAD
Forms 18.104.22.168 GOOD
Btw setting KeyWindow doesn't seem the correct way, maybe try UIWindow.Appearence.TintColor
In order to address some other problems in alerts and action sheets, DisplayAlert and DisplayActionSheet no longer use UIAlertView and UIActionSheet (both of which are deprecated as of iOS 8); instead they now use UIAlertController. They also display in a new UIWindow, which means they do not inherit the main application window's settings.
For globally setting a tint color which also applies to alerts and action sheets, you can use something like:
`UIView.Appearance.TintColor = myColor;`
If you only want to set the colors for alerts and action sheets specifically, you can use the `AppearanceWhenContainedIn` method, something like this:
`UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor = UIColor.Green;`
Hi E.Z. Hart.
but UIView.Appearance.TintColor = AppConstants.GlobalColor.ToUIColor(); is unusable because if I do that, it changes UITabbar's unseleced color as well, which is not correct behavior.
I changed each UI type separately. like below.
UITabBar.Appearance.TintColor = AppConstants.GlobalColor.ToUIColor();
UITextField.Appearance.TintColor = AppConstants.GlobalColor.ToUIColor();
UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor = AppConstants.GlobalColor.ToUIColor();
It's working well so far.