Reputation: 2440
How can I remove the top bar from iOS project of Xamarin.Forms? Where the time and "Carrier" word are
.. or at least measure its height?
Just to be sure.. I don't want to see battery, time... I want to hide the bar in the red rectangle:
Upvotes: 2
Views: 5060
Reputation: 905
In case of you want to hide programatically for each page. You have to create custom renderer for each Forms Page with UIViewController.
In UIViewController, you can override method like below
public partial class CustomViewController : UIViewController
{
public override bool PrefersStatusBarHidden()
{
return true;
}
}
Upvotes: 4
Reputation: 4220
You can add this code on your AppDelegate.cs
inside FinishedLaunching
method after LoadApplication (new App ());
on iOS Project:
UIApplication.SharedApplication.StatusBarHidden = true;
also add this on your info.plist
:
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Upvotes: 7