Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How can I hide the iOS status bar in landscape pages in iOS 7?

$
0
0

I have a forms app that I force a page to landscape. This part is (finally) working properly on an actual device.
But, testing on iOS 7 I realized that the status bar displays while on 8+ it does not in landscape. So, I am trying to hide it on iOS7 so that the design doesn't break (space is tight and I need those 20 pixels).

I have tried to set the override PrefersStatusBarHidden, but putting a break point in it doesn't ever get hit.
I should also mention that the landscape portion is a masterdetail page, so I have a LandscapeMasterDetailPage and the master and detail pages are LandscapeContentPage, where those classes have renderers that override the rotations and orientation methods to force landscape.

I can't figure out why it doesnt hit the PrefersStatusBarHidden, I tried calling SetNeedsStatusBarAppearanceUpdate in ViewWillAppear, and no success.
Also, tried to use UIApplication.SharedApplication.SetStatusBarHidden() in ViewWillAppear.

Does anyone know how I can accomplish this?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>