Hi
I have an iPad app in store called Mygazine Daily. The app is showing strange behavior in IOS6. The issue is narrowed down to this
I am not getting proper results when a execute a javascript in UIWebView using stringByEvaluatingJavaScriptFromString
Here is the string that works with IOS5
Here is what my desired function is
I have added alert() under different locations and this is what I found -
alert(div1.height) returns 840px under IOS5.1 but nothing under IOS6
Please help me understand what is different in IOS6
I have an iPad app in store called Mygazine Daily. The app is showing strange behavior in IOS6. The issue is narrowed down to this
I am not getting proper results when a execute a javascript in UIWebView using stringByEvaluatingJavaScriptFromString
Here is the string that works with IOS5
NSString *scriptString = @" function paging(){ var div1 = document.getElementById('page1').style; div1.height = window.innerHeight + 'px !important'; var columnWidth = window.innerWidth - 100; div1.webkitColumnWidth = columnWidth +'px !important'; div1.webkitColumnGap = '0px'; window.scroll(1000000,0); var result = window.pageXOffset/window.innerWidth + 1; return Math.ceil(result);} paging();";
Here is what my desired function is
Code:
function paging(){
var div1 = document.getElementById('page1').style;
div1.height = window.innerHeight + 'px !important';
var columnWidth = window.innerWidth - 100;
div1.webkitColumnWidth = columnWidth +'px !important';
div1.webkitColumnGap = '0px';
window.scroll(1000000,0);
var result = window.pageXOffset/window.innerWidth + 1;
return Math.ceil(result);}
paging();";
I have added alert() under different locations and this is what I found -
alert(div1.height) returns 840px under IOS5.1 but nothing under IOS6
Please help me understand what is different in IOS6
Last edited by a moderator: