IOS: Monotouch bindings for appearance on Bar styles missing?

I am trying to convert this to Monotouch C #:

[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque]; 

But the Appearance object does not seem to have a bar style.

Is there a job or an alternative access point?

+4
source share
1 answer

This property is not embellished with UI_APPEARANCE_SELECTOR in Objective-C header files. The initial work on the look of MonoTouch was based on this documentation (but we added more cases over time).

However, the way Apple implements support for appearance allows you to work a lot without documents (and, I hope, will continue to work if Apple changes its internal representation).

In any case, this means that you can hack it a bit, for example. by doing something like:

 IntPtr handle = UINavigationBar.Appearance.Handle; var appearance = new UINavigationBar (handle); appearance.BarStyle = UIBarStyle.BlackOpaque; 
+5
source

All Articles