Full Screen App on ios Xamarin forms

Daniel Desire 21 Reputation points
2022-05-25T12:16:26.42+00:00

Hi Team,

New to xamarin forms.

Struggling to find an answer to this question.

I want my app to cover the whole screen, even the Home Indicator bar on ios.

Is this possible?? Check attached picture. The Home Indicator Bar remain white even though I've change the background color to aqua.

205439-ios.jpeg

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,359 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 43,686 Reputation points Microsoft Vendor
    2022-05-26T06:02:02.157+00:00

    Hello,

    About hiding status bar on iOS:

    please open Info.plist by XML(Text) editor, add following key-value pairs(Status bar is initially hidden – Type Boolean – Value Yes
    View controller-based status bar appearance – Type Boolean – Value No) in the <dict> tag.

       <key>UIStatusBarHidden</key>  
       <true/>  
       <key>UIViewControllerBasedStatusBarAppearance</key>  
       <false/>  
    

    About hiding navigation bar

    If we wrap our page with NavigationPage, we could hide the navigation bar by setting a property in your page.

    Using XAML:

       <ContentPage NavigationPage.HasNavigationBar="false"  
          ..... >  
        </ContentPage>  
    

    Using C#, you could add the following code in your page constructor method:

       NavigationPage.SetHasNavigationBar(this, false);  
    

    If you are using Shell, you could use the following code to hide your navigation bar:

       <ContentPage ...  
                    Shell.NavBarIsVisible="false">  
           ...  
       </ContentPage>  
    

    About Home Indicator

    As a matter of fact, the Home Indicator is in the Safe-Area on iOS, therefore, it is not advocated to overlap the Home Indicator.

    On iOS, referring to this official documentation Home Indicator Visibility on iOS, we could find a better way to hide.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.