How to show the StatusBar on iOS 8 like iOS 7


#1

When you go to compile an app into iOS 8 maybe the StatusBar is showing together the header bar.

To solve this you need to change the css (vendor of ionic):

.platform-ios7.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader){height:64px}.platform-ios7.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader).item-input-inset .item-input-wrapper{margin-top:19px!important}.platform-ios7.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader)>*{margin-top:20px}.platform-ios7.platform-cordova:not(.fullscreen) .bar-subheader,.platform-ios7.platform-cordova:not(.fullscreen) .has-header,.platform-ios7.platform-cordova:not(.fullscreen) .tabs-top>.tabs,.platform-ios7.platform-cordova:not(.fullscreen) .tabs.tabs-top{top:64px}.platform-ios7.platform-cordova:not(.fullscreen) .has-subheader{top:108px}.platform-ios7.platform-cordova:not(.fullscreen) .has-tabs-top{top:113px}.platform-ios7.platform-cordova:not(.fullscreen) .has-header.has-subheader.has-tabs-top{top:157px}.platform-ios7.platform-cordova.status-bar-hide{margin-bottom:20px}@media (orientation:landscape){.platform-ios7.platform-browser.platform-ipad{position:fixed}}.platform-c:not(.enable-transitions) *{-webkit-transition:none!important;transition:none!important}

with:

.platform-ios8.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader){height:64px}.platform-ios8.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader).item-input-inset .item-input-wrapper{margin-top:19px!important}.platform-ios8.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader)>*{margin-top:20px}.platform-ios8.platform-cordova:not(.fullscreen) .bar-subheader,.platform-ios8.platform-cordova:not(.fullscreen) .has-header,.platform-ios8.platform-cordova:not(.fullscreen) .tabs-top>.tabs,.platform-ios8.platform-cordova:not(.fullscreen) .tabs.tabs-top{top:64px}.platform-ios8.platform-cordova:not(.fullscreen) .has-subheader{top:108px}.platform-ios8.platform-cordova:not(.fullscreen) .has-tabs-top{top:113px}.platform-ios8.platform-cordova:not(.fullscreen) .has-header.has-subheader.has-tabs-top{top:157px}.platform-ios8.platform-cordova.status-bar-hide{margin-bottom:20px}@media (orientation:landscape){.platform-ios8.platform-browser.platform-ipad{position:fixed}}.platform-c:not(.enable-transitions) *{-webkit-transition:none!important;transition:none!important}

This show everything OK

The specific code to solve only the StatusBar issue is:

.platform-ios8.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader)>*{margin-top:20px}

May this is solve on the latest ionic build.

I hope this help some one.


#2

Super Amazing… It works… Thank you :smile: