Brosteins

Developers, Technology Evangelists, Bros.

Hide the iOS status bar in a NativeScript app

I’ve been working on an app to monitor the weather at a farm recently, and I wanted to hide the iOS status bar because it looks like it’s in the way:

ugly status bar

See? Doesn’t it look out of place?

Hiding the iOS status bar in a NativeScript app

This is a quick tip that I always have to lookup, so I decided to put it here so I’d always know where to look.

To hide the iOS status bar in a NativeScript app, add the UIStatusBarHidden and UIViewControllerBasedStatusBarAppearance key/value pairs to the Info.plist file. Set UIStatusBarHidden to true, and UIViewControllerBasedStatusBarAppearance to false:

When the app reloads, the status bar is hidden:

status bar hidden

 

Share

2 comments for “Hide the iOS status bar in a NativeScript app

  1. Avatar
    Ted
    February 5, 2018 at 7:29 pm

    And just for the heck of it, would be nice to have an example of hiding it on Android as well.

  2. Avatar
    vaishak
    December 4, 2018 at 12:10 pm

    how to recall the status bar with a gesture on ios??

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.