I try to distinguish an Iphone 5 device in a non full screen UIWebview
(320x216) from javascript.
I am using the screen height as switch as that seems the only way to do this in javascript.
The problem is that the usual way to do this reports either 0 or the height of the UIWebview
, not the height of the device.
document.body.offsetHeight //returns 216
screen.availHeight //returns 0
document.documentElement.clientHeight //returns 216
window.innerHeight //returns 216
screen.height //returns 0
Does anybody know of a method to do this? I unfortunately don't have control over the objective c code for the UIWebview
.