I'm trying to convert this to Monotouch C#:
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];
But on the Appearance object there doesn't seem to be a Bar Style.
Is there a work around or alternative access point?
I'm trying to convert this to Monotouch C#:
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];
But on the Appearance object there doesn't seem to be a Bar Style.
Is there a work around or alternative access point?
This property is not decorated with UI_APPEARANCE_SELECTOR
in the Objective-C header files. The initial MonoTouch Appearance work was based on that documentation (but we added more cases over time).
However the way Apple implement it's appearance support allows a lot of undocumented things will work (and hopefully continue to work if Apple change it's internal representation).
Anyway this means you can hack around this a bit, e.g. by doing something like:
IntPtr handle = UINavigationBar.Appearance.Handle;
var appearance = new UINavigationBar (handle);
appearance.BarStyle = UIBarStyle.BlackOpaque;