UIAppearance appearanceWhenContainedInInstancesOfClasses incorrectly restricted to tvOS #3230
Labels
enhancement
The issue or pull request is an enhancement
good first issue
This is a good first issue for someone to start working with our code
iOS
Issues affecting Xamarin.iOS
missing-api-bindings
Milestone
Note: This is a C/P from my StackOverflow answer, so if you need additional info, just ask, thanks.
There are a number of missing
UIAppearance
features in Xamarin.iOS and in regards to your question, there is a missing API.UIAppearance.cs
to add the missing features and correct the missing API and assume no other Xamarin.iOS coders really use the newerUIAppearance
features as it has been broken since iOS 9 in Xamarin.First,
appearanceWhenContainedIn
is deprecated and you should be usingappearanceWhenContainedInInstancesOfClasses
instead.Second,
appearanceWhenContainedInInstancesOfClasses
is incorrectly defined withinXamarin.iOS
as only available intvOS
via a#if TVOS
and that is just not true.Re: Apple Docs: https://developer.apple.com/documentation/uikit/uiappearance/1615013-appearancewhencontainedininstanc
UIAppearance.cs#L77
Thus it is not available via the iOS wrapper API, but of course is available directly from the ObjC runtime as such:
The next problem there are a number of Xamarin.iOS methods marked internal that are needed for the above code to function, so some copy/paste/modify of some source is needed:
Xamarin.iOS Version: 11.8.0.1
The text was updated successfully, but these errors were encountered: