UINavigationBar.Appearance.[Compact|Standard|ScrollEdge]AppearanceUINavigationBar.Appearance should return an appearance proxy exposing properties allowing the use of UINavigationBarAppearance instances.
Compile error. Return type of Appearance property is incorrect.
Available in Swift
let barAppearance = UINavigationBarAppearance()
// Set some properties...
UINavigationBar.appearance().standardAppearance = barAppearance
Given an instance of UINavigationBar, the new properties are exposed. It's just the static property that is incorrect.
C#
var bar = new UINavigationBar(/*...*/);
bar.StandardAppearance = new UINavigationBarAppearance();
Visual Studio Mac 8.2.5 (Build 42)
Mono MDK 6.0.0.333 (2019/02)
Xamarin iOS 5.99.4.26
This looks reasonable. I'm adding to xcode11 milestone for now, but we can add this later if necessary (since it shouldn't be a breaking change).
Thanks for the report!
Any updates on this? Without the proxies I have to set the appearances on each UIViewController separately.
These proxies appearance proxies are available our iOS 13.2 release (the current stable version of Xamarin.iOS), so I'm closing this. Feel free to reopen if you continue to have problems with these appearance proxies.
See also #6834.
I'm on the iOS 13.2 release, but the static property Appearance on UINavigationBar of type UINavigationBarAppearance is not exposing CompactAppearance, StandardAppearance and ScrollEdgeAppearance (as the OP pointed out).
You're correct, a fix is in progress now.
There are stil not appearance properties CompactAppearance, StandardAppearance and ScrollEdgeAppearance on the static property Appearance on UINavigationBar.
UINavigationBar.Appearance.StandardAppearance -
Error CS1061 'UINavigationBar.UINavigationBarAppearance' does not contain a definition for 'StandardAppearance' and no accessible extension method 'StandardAppearance' accepting a first argument of type 'UINavigationBar.UINavigationBarAppearance' could be found (are you missing a using directive or an assembly reference?)
Xamarin.iOS
Version: 13.2.0.47
Hash: c2cbd3480
Branch: d16-3
Build date: 2019-09-30 22:37:32-0400
@VladimirAbakumov it'll be in the next release, which will come out within the next few days.
Most helpful comment
Fixed in https://github.com/xamarin/xamarin-macios/commit/3ec3470a4ef6313f47edd70b1f919699acd7a38c.