Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap IOS - scrollbar appear while I try to scroll home page even if html file was empty

Tags:

ios

cordova

I just create a IOS Phonegap app using Terminal, then change UIWebViewBounce t= false in config.xml, and delete all contents inside body, and delete all CSS data.

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <link rel="stylesheet" type="text/css" href="css/index.css" />
    <title>Hello World</title>
   <script type="text/javascript" src="cordova-2.4.0.js"></script>
</head>
<body>

</body>
</html>

This is my HTML page, my index.css is empty and my Phonegap version is 2.4. Then I run the app: App run

When I try to scroll the empty page, a scroll bar appears: App run with scrollbar

Why? Can anyone please help me?

**UPDATE Solved : just remove height=device-height from meta tag OR Remove status bar **

like image 993
Arjun T Raj Avatar asked Mar 25 '13 10:03

Arjun T Raj


1 Answers

Yes, This is due to the device status bar, me also faced this issue, it will take almost 20px of window height. Better make sure that you have checked "Hide status bar" option in xcode Targets.

enter image description here

like image 144
manukv Avatar answered Sep 19 '22 19:09

manukv