Ionic ion-view header behind ios status bar

后端 未结 10 2211
礼貌的吻别
礼貌的吻别 2021-01-04 09:15

How do I avoid ionic header from getting behind ios status bar like this?

I created the header with following code:



        
10条回答
  •  醉梦人生
    2021-01-04 09:37

    The solution with StatusBar.styleDefault(); did not work for me, but calling StatusBar.overlaysWebView(false) did the job.

    First screenshot is UI of the app before calling StatusBar.overlaysWebView(false), you can see that the iOS status bar is over the app and user cannot click the whole area of menu button:

    Now when I call StatusBar.overlaysWebView(false), the iOS status bar is no longer over the menu button:

提交回复
热议问题