我有一个使用Titanium,Appcelerator构建的本机应用程序。 Appcelerator fireevent不适用于新版iOS以在应用程序中显示webview。
任何人都可以帮我吗?
$(document).ready(function () {
'use strict';
Ti.App.fireEvent('loaded');
}
Ti.App.addEventListener('loaded', function() {
// Pass data to the webView
var viewHeight = $.webview.size.height;
var floor = '';
var section = store[0].toLowerCase();
if(section == 'a' || section == 'b' || section == 'c' || section == 'd' || section == 'e' || section == 'f'){
floor = 'floor1';
$.resetClass($.btn_first_floor, "current-floor");
$.resetClass($.btn_second_floor, "other-floor");
}else {
floor = 'floor2';
$.resetClass($.btn_second_floor, "current-floor");
$.resetClass($.btn_first_floor, "other-floor");
}
$.webview.evalJS("initMap('beacon" + Alloy.Globals.lastBeacon.minor +
"', '" + store.toLowerCase() + "', '" + viewHeight + "', '" + floor +
"');");
});