I have a nice running HTML5 Website with some JavaScript. This Page is called in a UIWebView. The Page runs some JavaScript to check, weather the iPad is in Portrait or in Landscape Mode.
And here is the Problem. It doesn't matter, if the iPad is in Landscape or in Portrait-Mode, the Function call:
orientationObserver.getOrientation()
always returns "portrait".
Is this a known Problem, or am i doing something wrong? I set the View containing the UIWebView to landscape mode with:
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation {
* * // Return YES for supported orientations
* * return (interfaceOrientation==UIInterfaceOrientationLands capeLeft);
}
i do an:
alert(orientationObserver.getOrientation()
in the
JS and it returns always "Portrait", the device (and so the App) runs in landscape.