底部的白色空間,你可以看到,在我的頁面底部仍然是一個空白。 它的高度與ios6中的舊狀態欄相同。 我必須修改css嗎?因爲我從來沒有爲我的應用固定高度,所以worklight總是選擇合適的尺寸。
編輯:你必須保存圖像,並在不同顏色的桌面打開,看看底部的空白處。
*
* Licensed Materials - Property of IBM
* 5725-G92 (C) Copyright IBM Corp. 2011, 2013. All Rights Reserved.
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
// This method is invoked after loading the main HTML and successful initialization of the Worklight runtime.
function wlEnvInit(){
wlCommonInit();
// Environment initialization code goes here
}
//Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
alert(device.version);
if(device.version > "6.0")
$(".elmecHeader").css("height", "70px");
}
我不認爲我喜歡'device.version>「6.0」',也許看看這個線程:HTTP ://stackoverflow.com/questions/6832596/how-to-compare-software-version-number-using-js-only-number –