Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70903

How to hide the status bar for a particular screen

$
0
0

@ir2pid wrote:

I’m trying to hide the statusbar and make the content fullscreen but it doesn’t seem to work.

in appcomponent.ts .

//for most pages
if (core.isPlatform(OsType.CORDOVA)) {
        this.statusBar.styleLightContent();
        this.statusBar.overlaysWebView(false);
        this.statusBar.backgroundColorByHexString('#0076b2');
 }

code:
in page.ts

//for specific page
 ionViewDidLoad() {
    this.slides.lockSwipes(true);
    if (this.core.isPlatform(OsType.CORDOVA)) {
      this.statusBar.hide();
      this.statusBar.overlaysWebView(true);
    }
  }

  ionViewWillLeave() {
    if (this.core.isPlatform(OsType.CORDOVA)) {
      this.statusBar.show();
      this.statusBar.overlaysWebView(false);
    }
  }

my result is always with the blue Statusbar visible:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70903

Trending Articles



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