John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

Battery meter shows in my header.

The iPhone battery meter shows in my header. How do I make the app load under the battery status meter?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Battery meter shows in my header.

Hi John,

Run the following JavaScript code on Page Load event:preif (parseFloat(window.device.version) === 7.0) {
$("body").css("margin-top", "20px");
}/pre

John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

Battery meter shows in my header.

How would I do this so it applies to all pages?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Battery meter shows in my header.

John,

Add custom JavaScript with a function that you'll call on Page Show event:pre$(window).bind({
pageshow: function() {
/// paste the code here
}
});/pre

John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

Battery meter shows in my header.

The margin-top option does not work. This seems like it should be standard with Appery.io. Am I doing something wrong

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Battery meter shows in my header.

John,

Doesn't it work for one page?

John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

Battery meter shows in my header.

No, I only tried it for one page. Should I be able to add this to the theme?

John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

Battery meter shows in my header.

I put it in the theme and it came out pretty good. I will just have to remove it for the android. I am still surprised there is not a more universal setting for this issue.

John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

Battery meter shows in my header.

I found the solution. Its not an Appery issue, its all IOS 7 development. Here is what worked for me.

add this to your info.plist file,

UIStatusBarHidden UIViewControllerBasedStatusBarAppearance

Set it to False or NO in Xcode

m z
Posts: 0
Joined: Sat Nov 02, 2013 1:39 am

Battery meter shows in my header.

Can you explain this in a little more detail (adding UIStatusBarHidden field)? This was a nice find since I was also able to fix the rotation issue in ios7 by adding the options in the plist file settings. Image

Return to “Issues”