Monotouch Dial Status Bar Hidden - Changing API Safe

How can I hide the status bar in a Monotouch application so that it is backwards compatible with iOS 3.X when developing on iOS> = 4.X?

+5
source share
1 answer

If you ever needed to set the status bar hidden in the Monotouch application, and wanted to do it correctly for code that works backwards compatible with OS 3.X when developing on iOS SDK 4.X, as well as for newer devices, here is the answer :

if (UIApplication.SharedApplication.RespondsToSelector(new Selector("setStatusBarHidden: withAnimation:")))
    UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Fade);
else
    UIApplication.SharedApplication.SetStatusBarHidden(true, true);
+5
source

All Articles