Page 1 of 4

Battery meter shows in my header.

Posted: Thu Nov 21, 2013 6:01 pm
by John6122514

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


Battery meter shows in my header.

Posted: Thu Nov 21, 2013 7:43 pm
by Kateryna Grynko

Hi John,

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


Battery meter shows in my header.

Posted: Thu Nov 21, 2013 9:06 pm
by John6122514

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


Battery meter shows in my header.

Posted: Thu Nov 21, 2013 10:28 pm
by Kateryna Grynko

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


Battery meter shows in my header.

Posted: Fri Nov 22, 2013 10:02 pm
by John6122514

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


Battery meter shows in my header.

Posted: Fri Nov 22, 2013 10:20 pm
by Kateryna Grynko

John,

Doesn't it work for one page?


Battery meter shows in my header.

Posted: Fri Nov 22, 2013 10:28 pm
by John6122514

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


Battery meter shows in my header.

Posted: Fri Nov 22, 2013 10:38 pm
by John6122514

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.


Battery meter shows in my header.

Posted: Sun Nov 24, 2013 12:26 am
by John6122514

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


Battery meter shows in my header.

Posted: Sun Nov 24, 2013 5:21 am
by m z

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