iOS status bar overlapping contents












17















I have built phonegap application, it works fine on android and windows.
But for iOS I am facing issue as, status bar contents and page contents are mixed up therefore i unable to tap on the back button provided in header.
Can any body help me about this..?



This is my config.xml file



   <?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"

id = "io.example.com"
version = "1.0.2">
<name>MyAPP</name>

<description>

</description>

<author email="rakesh@gmail.com">
Rakesh
</author>

<access origin="*"/>


<content src="index.html" />


<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<!-- <preference name="fullscreen" value="true" /> --> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="false" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="phonegap-version" value="3.7.0" />
<icon src="icon.png" />

<icon src="icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="icon-76-2x.png" gap:platform="ios" width="152" height="152" />

<gap:plugin name="com.phonegap.plugin.statusbar" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:splash src="SplashScreenImage.jpg" gap:platform="winphone" />
<gap:splash src="splash.png" />
<gap:splash src="screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />

<gap:config-file platform="ios" parent="CFBundleShortVersionString">
<string>100</string>
</gap:config-file>

<feature name="App">
<param name="android-package" value="org.apache.cordova.App"/>
</feature>
<feature name="http://api.phonegap.com/1.0/network"/>

<!-- Deprecated plugins element. Remove in 3.0 -->


</widget>









share|improve this question

























  • plz share your config.xml

    – sunil
    Oct 5 '15 at 9:14











  • please share some code content for better understanding of your bug.

    – Ali
    Oct 5 '15 at 9:17
















17















I have built phonegap application, it works fine on android and windows.
But for iOS I am facing issue as, status bar contents and page contents are mixed up therefore i unable to tap on the back button provided in header.
Can any body help me about this..?



This is my config.xml file



   <?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"

id = "io.example.com"
version = "1.0.2">
<name>MyAPP</name>

<description>

</description>

<author email="rakesh@gmail.com">
Rakesh
</author>

<access origin="*"/>


<content src="index.html" />


<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<!-- <preference name="fullscreen" value="true" /> --> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="false" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="phonegap-version" value="3.7.0" />
<icon src="icon.png" />

<icon src="icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="icon-76-2x.png" gap:platform="ios" width="152" height="152" />

<gap:plugin name="com.phonegap.plugin.statusbar" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:splash src="SplashScreenImage.jpg" gap:platform="winphone" />
<gap:splash src="splash.png" />
<gap:splash src="screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />

<gap:config-file platform="ios" parent="CFBundleShortVersionString">
<string>100</string>
</gap:config-file>

<feature name="App">
<param name="android-package" value="org.apache.cordova.App"/>
</feature>
<feature name="http://api.phonegap.com/1.0/network"/>

<!-- Deprecated plugins element. Remove in 3.0 -->


</widget>









share|improve this question

























  • plz share your config.xml

    – sunil
    Oct 5 '15 at 9:14











  • please share some code content for better understanding of your bug.

    – Ali
    Oct 5 '15 at 9:17














17












17








17


0






I have built phonegap application, it works fine on android and windows.
But for iOS I am facing issue as, status bar contents and page contents are mixed up therefore i unable to tap on the back button provided in header.
Can any body help me about this..?



This is my config.xml file



   <?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"

id = "io.example.com"
version = "1.0.2">
<name>MyAPP</name>

<description>

</description>

<author email="rakesh@gmail.com">
Rakesh
</author>

<access origin="*"/>


<content src="index.html" />


<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<!-- <preference name="fullscreen" value="true" /> --> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="false" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="phonegap-version" value="3.7.0" />
<icon src="icon.png" />

<icon src="icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="icon-76-2x.png" gap:platform="ios" width="152" height="152" />

<gap:plugin name="com.phonegap.plugin.statusbar" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:splash src="SplashScreenImage.jpg" gap:platform="winphone" />
<gap:splash src="splash.png" />
<gap:splash src="screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />

<gap:config-file platform="ios" parent="CFBundleShortVersionString">
<string>100</string>
</gap:config-file>

<feature name="App">
<param name="android-package" value="org.apache.cordova.App"/>
</feature>
<feature name="http://api.phonegap.com/1.0/network"/>

<!-- Deprecated plugins element. Remove in 3.0 -->


</widget>









share|improve this question
















I have built phonegap application, it works fine on android and windows.
But for iOS I am facing issue as, status bar contents and page contents are mixed up therefore i unable to tap on the back button provided in header.
Can any body help me about this..?



This is my config.xml file



   <?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"

id = "io.example.com"
version = "1.0.2">
<name>MyAPP</name>

<description>

</description>

<author email="rakesh@gmail.com">
Rakesh
</author>

<access origin="*"/>


<content src="index.html" />


<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<!-- <preference name="fullscreen" value="true" /> --> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="false" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="phonegap-version" value="3.7.0" />
<icon src="icon.png" />

<icon src="icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="icon-76-2x.png" gap:platform="ios" width="152" height="152" />

<gap:plugin name="com.phonegap.plugin.statusbar" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:splash src="SplashScreenImage.jpg" gap:platform="winphone" />
<gap:splash src="splash.png" />
<gap:splash src="screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />

<gap:config-file platform="ios" parent="CFBundleShortVersionString">
<string>100</string>
</gap:config-file>

<feature name="App">
<param name="android-package" value="org.apache.cordova.App"/>
</feature>
<feature name="http://api.phonegap.com/1.0/network"/>

<!-- Deprecated plugins element. Remove in 3.0 -->


</widget>






ios cordova phonegap-plugins ios-statusbar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 5 '15 at 9:52









Lorenzo

2,24621541




2,24621541










asked Oct 5 '15 at 9:11









RAKESH DADHICHRAKESH DADHICH

1011110




1011110













  • plz share your config.xml

    – sunil
    Oct 5 '15 at 9:14











  • please share some code content for better understanding of your bug.

    – Ali
    Oct 5 '15 at 9:17



















  • plz share your config.xml

    – sunil
    Oct 5 '15 at 9:14











  • please share some code content for better understanding of your bug.

    – Ali
    Oct 5 '15 at 9:17

















plz share your config.xml

– sunil
Oct 5 '15 at 9:14





plz share your config.xml

– sunil
Oct 5 '15 at 9:14













please share some code content for better understanding of your bug.

– Ali
Oct 5 '15 at 9:17





please share some code content for better understanding of your bug.

– Ali
Oct 5 '15 at 9:17












7 Answers
7






active

oldest

votes


















14














Add these lines to your config.xml file



<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="StatusBarStyle" value="lightcontent" />
<gap:plugin name="com.phonegap.plugin.statusbar" />





share|improve this answer































    25














    The accepted answer from sunil is no longer relevant, the plugin is deprecated.



    Use the following in your config.xml



    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
    <preference name="StatusBarStyle" value="lightcontent" />
    <plugin spec="https://github.com/apache/cordova-plugin-statusbar.git" source="git" />





    share|improve this answer
























    • good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

      – TechSavvySam
      Jun 28 '17 at 14:39











    • This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

      – mintedsky
      Feb 8 '18 at 16:44













    • Its not working even though i did the same as you mentioned.

      – Mohanraj
      Mar 16 '18 at 13:52



















    4














    If you want to hide the StatusBar totaly you can add two keys into your info.plist which are Booleans:



    Status bar is initially hidden - YES

    View controller-based status bar appearance - NO





    share|improve this answer































      4














      This can be accomplished with the help of the statusbar plugin.
      All you need is to install the plugin via the command line phonegap plugin add https://github.com/apache/cordova-plugin-statusbar.git and then add StatusBar.hide(); onDeviceReady event.






      share|improve this answer



















      • 1





        Question was not to hide the element. It just shouldn't overlap the content.

        – GOSCHEN
        Jul 15 '16 at 12:38



















      3














      Applied @sunil resolution but,



      My problem was of "Content Security Policy" on iOS 10



      Added below line to index.html resolved the issue:



      <meta http-equiv="Content-Security-Policy" content="default-src 'self' gap://ready file://* *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">





      share|improve this answer































        3














        For detail usage in codova 6+ now, for more of @sunil's solution, we should use



        cordova plugins add -save cordova-plugin-statusbar


        For detail usage: https://www.npmjs.com/package/cordova-plugin-statusbar






        share|improve this answer

































          0














          add these lines in config.xml use this it will fix your issue and status bar get appear:



          <preference name="StatusBarOverlaysWebView" value="true"/>

          <preference name="StatusBarBackgroundColor" value="#000000"/>

          <preference name="StatusBarStyle" value="lightcontent" />





          share|improve this answer


























          • What do you mean by "these lines"?

            – Nico Haase
            Nov 26 '18 at 13:45











          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

            – Nico Haase
            Nov 26 '18 at 13:45











          • In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

            – Lakshay Sharma
            Nov 28 '18 at 5:04











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32944888%2fios-status-bar-overlapping-contents%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          14














          Add these lines to your config.xml file



          <preference name="StatusBarOverlaysWebView" value="false" />
          <preference name="StatusBarBackgroundColor" value="#000000" />
          <preference name="StatusBarStyle" value="lightcontent" />
          <gap:plugin name="com.phonegap.plugin.statusbar" />





          share|improve this answer




























            14














            Add these lines to your config.xml file



            <preference name="StatusBarOverlaysWebView" value="false" />
            <preference name="StatusBarBackgroundColor" value="#000000" />
            <preference name="StatusBarStyle" value="lightcontent" />
            <gap:plugin name="com.phonegap.plugin.statusbar" />





            share|improve this answer


























              14












              14








              14







              Add these lines to your config.xml file



              <preference name="StatusBarOverlaysWebView" value="false" />
              <preference name="StatusBarBackgroundColor" value="#000000" />
              <preference name="StatusBarStyle" value="lightcontent" />
              <gap:plugin name="com.phonegap.plugin.statusbar" />





              share|improve this answer













              Add these lines to your config.xml file



              <preference name="StatusBarOverlaysWebView" value="false" />
              <preference name="StatusBarBackgroundColor" value="#000000" />
              <preference name="StatusBarStyle" value="lightcontent" />
              <gap:plugin name="com.phonegap.plugin.statusbar" />






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Oct 5 '15 at 9:23









              sunilsunil

              7441325




              7441325

























                  25














                  The accepted answer from sunil is no longer relevant, the plugin is deprecated.



                  Use the following in your config.xml



                  <preference name="StatusBarOverlaysWebView" value="false" />
                  <preference name="StatusBarBackgroundColor" value="#000000" />
                  <preference name="StatusBarStyle" value="lightcontent" />
                  <plugin spec="https://github.com/apache/cordova-plugin-statusbar.git" source="git" />





                  share|improve this answer
























                  • good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

                    – TechSavvySam
                    Jun 28 '17 at 14:39











                  • This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

                    – mintedsky
                    Feb 8 '18 at 16:44













                  • Its not working even though i did the same as you mentioned.

                    – Mohanraj
                    Mar 16 '18 at 13:52
















                  25














                  The accepted answer from sunil is no longer relevant, the plugin is deprecated.



                  Use the following in your config.xml



                  <preference name="StatusBarOverlaysWebView" value="false" />
                  <preference name="StatusBarBackgroundColor" value="#000000" />
                  <preference name="StatusBarStyle" value="lightcontent" />
                  <plugin spec="https://github.com/apache/cordova-plugin-statusbar.git" source="git" />





                  share|improve this answer
























                  • good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

                    – TechSavvySam
                    Jun 28 '17 at 14:39











                  • This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

                    – mintedsky
                    Feb 8 '18 at 16:44













                  • Its not working even though i did the same as you mentioned.

                    – Mohanraj
                    Mar 16 '18 at 13:52














                  25












                  25








                  25







                  The accepted answer from sunil is no longer relevant, the plugin is deprecated.



                  Use the following in your config.xml



                  <preference name="StatusBarOverlaysWebView" value="false" />
                  <preference name="StatusBarBackgroundColor" value="#000000" />
                  <preference name="StatusBarStyle" value="lightcontent" />
                  <plugin spec="https://github.com/apache/cordova-plugin-statusbar.git" source="git" />





                  share|improve this answer













                  The accepted answer from sunil is no longer relevant, the plugin is deprecated.



                  Use the following in your config.xml



                  <preference name="StatusBarOverlaysWebView" value="false" />
                  <preference name="StatusBarBackgroundColor" value="#000000" />
                  <preference name="StatusBarStyle" value="lightcontent" />
                  <plugin spec="https://github.com/apache/cordova-plugin-statusbar.git" source="git" />






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 10 '17 at 10:32









                  JazzCatJazzCat

                  1,8801835




                  1,8801835













                  • good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

                    – TechSavvySam
                    Jun 28 '17 at 14:39











                  • This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

                    – mintedsky
                    Feb 8 '18 at 16:44













                  • Its not working even though i did the same as you mentioned.

                    – Mohanraj
                    Mar 16 '18 at 13:52



















                  • good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

                    – TechSavvySam
                    Jun 28 '17 at 14:39











                  • This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

                    – mintedsky
                    Feb 8 '18 at 16:44













                  • Its not working even though i did the same as you mentioned.

                    – Mohanraj
                    Mar 16 '18 at 13:52

















                  good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

                  – TechSavvySam
                  Jun 28 '17 at 14:39





                  good explanation of this here: devgirl.org/2014/07/31/phonegap-developers-guid

                  – TechSavvySam
                  Jun 28 '17 at 14:39













                  This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

                  – mintedsky
                  Feb 8 '18 at 16:44







                  This created a clean well-spaced statusbar with black background and white font color that separated the app from the bar. Perfect for my app, thanks~

                  – mintedsky
                  Feb 8 '18 at 16:44















                  Its not working even though i did the same as you mentioned.

                  – Mohanraj
                  Mar 16 '18 at 13:52





                  Its not working even though i did the same as you mentioned.

                  – Mohanraj
                  Mar 16 '18 at 13:52











                  4














                  If you want to hide the StatusBar totaly you can add two keys into your info.plist which are Booleans:



                  Status bar is initially hidden - YES

                  View controller-based status bar appearance - NO





                  share|improve this answer




























                    4














                    If you want to hide the StatusBar totaly you can add two keys into your info.plist which are Booleans:



                    Status bar is initially hidden - YES

                    View controller-based status bar appearance - NO





                    share|improve this answer


























                      4












                      4








                      4







                      If you want to hide the StatusBar totaly you can add two keys into your info.plist which are Booleans:



                      Status bar is initially hidden - YES

                      View controller-based status bar appearance - NO





                      share|improve this answer













                      If you want to hide the StatusBar totaly you can add two keys into your info.plist which are Booleans:



                      Status bar is initially hidden - YES

                      View controller-based status bar appearance - NO






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Oct 5 '15 at 12:40









                      SithysSithys

                      2,42931841




                      2,42931841























                          4














                          This can be accomplished with the help of the statusbar plugin.
                          All you need is to install the plugin via the command line phonegap plugin add https://github.com/apache/cordova-plugin-statusbar.git and then add StatusBar.hide(); onDeviceReady event.






                          share|improve this answer



















                          • 1





                            Question was not to hide the element. It just shouldn't overlap the content.

                            – GOSCHEN
                            Jul 15 '16 at 12:38
















                          4














                          This can be accomplished with the help of the statusbar plugin.
                          All you need is to install the plugin via the command line phonegap plugin add https://github.com/apache/cordova-plugin-statusbar.git and then add StatusBar.hide(); onDeviceReady event.






                          share|improve this answer



















                          • 1





                            Question was not to hide the element. It just shouldn't overlap the content.

                            – GOSCHEN
                            Jul 15 '16 at 12:38














                          4












                          4








                          4







                          This can be accomplished with the help of the statusbar plugin.
                          All you need is to install the plugin via the command line phonegap plugin add https://github.com/apache/cordova-plugin-statusbar.git and then add StatusBar.hide(); onDeviceReady event.






                          share|improve this answer













                          This can be accomplished with the help of the statusbar plugin.
                          All you need is to install the plugin via the command line phonegap plugin add https://github.com/apache/cordova-plugin-statusbar.git and then add StatusBar.hide(); onDeviceReady event.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 5 '15 at 13:24









                          404404

                          6681718




                          6681718








                          • 1





                            Question was not to hide the element. It just shouldn't overlap the content.

                            – GOSCHEN
                            Jul 15 '16 at 12:38














                          • 1





                            Question was not to hide the element. It just shouldn't overlap the content.

                            – GOSCHEN
                            Jul 15 '16 at 12:38








                          1




                          1





                          Question was not to hide the element. It just shouldn't overlap the content.

                          – GOSCHEN
                          Jul 15 '16 at 12:38





                          Question was not to hide the element. It just shouldn't overlap the content.

                          – GOSCHEN
                          Jul 15 '16 at 12:38











                          3














                          Applied @sunil resolution but,



                          My problem was of "Content Security Policy" on iOS 10



                          Added below line to index.html resolved the issue:



                          <meta http-equiv="Content-Security-Policy" content="default-src 'self' gap://ready file://* *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">





                          share|improve this answer




























                            3














                            Applied @sunil resolution but,



                            My problem was of "Content Security Policy" on iOS 10



                            Added below line to index.html resolved the issue:



                            <meta http-equiv="Content-Security-Policy" content="default-src 'self' gap://ready file://* *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">





                            share|improve this answer


























                              3












                              3








                              3







                              Applied @sunil resolution but,



                              My problem was of "Content Security Policy" on iOS 10



                              Added below line to index.html resolved the issue:



                              <meta http-equiv="Content-Security-Policy" content="default-src 'self' gap://ready file://* *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">





                              share|improve this answer













                              Applied @sunil resolution but,



                              My problem was of "Content Security Policy" on iOS 10



                              Added below line to index.html resolved the issue:



                              <meta http-equiv="Content-Security-Policy" content="default-src 'self' gap://ready file://* *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">






                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jan 9 '17 at 11:51









                              Abbas MulaniAbbas Mulani

                              4361618




                              4361618























                                  3














                                  For detail usage in codova 6+ now, for more of @sunil's solution, we should use



                                  cordova plugins add -save cordova-plugin-statusbar


                                  For detail usage: https://www.npmjs.com/package/cordova-plugin-statusbar






                                  share|improve this answer






























                                    3














                                    For detail usage in codova 6+ now, for more of @sunil's solution, we should use



                                    cordova plugins add -save cordova-plugin-statusbar


                                    For detail usage: https://www.npmjs.com/package/cordova-plugin-statusbar






                                    share|improve this answer




























                                      3












                                      3








                                      3







                                      For detail usage in codova 6+ now, for more of @sunil's solution, we should use



                                      cordova plugins add -save cordova-plugin-statusbar


                                      For detail usage: https://www.npmjs.com/package/cordova-plugin-statusbar






                                      share|improve this answer















                                      For detail usage in codova 6+ now, for more of @sunil's solution, we should use



                                      cordova plugins add -save cordova-plugin-statusbar


                                      For detail usage: https://www.npmjs.com/package/cordova-plugin-statusbar







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Apr 6 '17 at 3:05

























                                      answered Dec 27 '16 at 6:27









                                      Alfred HuangAlfred Huang

                                      9,1542079134




                                      9,1542079134























                                          0














                                          add these lines in config.xml use this it will fix your issue and status bar get appear:



                                          <preference name="StatusBarOverlaysWebView" value="true"/>

                                          <preference name="StatusBarBackgroundColor" value="#000000"/>

                                          <preference name="StatusBarStyle" value="lightcontent" />





                                          share|improve this answer


























                                          • What do you mean by "these lines"?

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

                                            – Lakshay Sharma
                                            Nov 28 '18 at 5:04
















                                          0














                                          add these lines in config.xml use this it will fix your issue and status bar get appear:



                                          <preference name="StatusBarOverlaysWebView" value="true"/>

                                          <preference name="StatusBarBackgroundColor" value="#000000"/>

                                          <preference name="StatusBarStyle" value="lightcontent" />





                                          share|improve this answer


























                                          • What do you mean by "these lines"?

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

                                            – Lakshay Sharma
                                            Nov 28 '18 at 5:04














                                          0












                                          0








                                          0







                                          add these lines in config.xml use this it will fix your issue and status bar get appear:



                                          <preference name="StatusBarOverlaysWebView" value="true"/>

                                          <preference name="StatusBarBackgroundColor" value="#000000"/>

                                          <preference name="StatusBarStyle" value="lightcontent" />





                                          share|improve this answer















                                          add these lines in config.xml use this it will fix your issue and status bar get appear:



                                          <preference name="StatusBarOverlaysWebView" value="true"/>

                                          <preference name="StatusBarBackgroundColor" value="#000000"/>

                                          <preference name="StatusBarStyle" value="lightcontent" />






                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Nov 26 '18 at 14:36


























                                          community wiki





                                          2 revs, 2 users 74%
                                          Lakshay Sharma














                                          • What do you mean by "these lines"?

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

                                            – Lakshay Sharma
                                            Nov 28 '18 at 5:04



















                                          • What do you mean by "these lines"?

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

                                            – Nico Haase
                                            Nov 26 '18 at 13:45











                                          • In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

                                            – Lakshay Sharma
                                            Nov 28 '18 at 5:04

















                                          What do you mean by "these lines"?

                                          – Nico Haase
                                          Nov 26 '18 at 13:45





                                          What do you mean by "these lines"?

                                          – Nico Haase
                                          Nov 26 '18 at 13:45













                                          This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

                                          – Nico Haase
                                          Nov 26 '18 at 13:45





                                          This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

                                          – Nico Haase
                                          Nov 26 '18 at 13:45













                                          In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

                                          – Lakshay Sharma
                                          Nov 28 '18 at 5:04





                                          In Hybrid application there is the config file, in which we have to make some entries for displaying the status bar in proper manner

                                          – Lakshay Sharma
                                          Nov 28 '18 at 5:04


















                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Stack Overflow!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32944888%2fios-status-bar-overlapping-contents%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Contact image not getting when fetch all contact list from iPhone by CNContact

                                          count number of partitions of a set with n elements into k subsets

                                          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks