Better way to detect orientation chage

1 view
Skip to first unread message

killer...@gmail.com

unread,
Sep 30, 2007, 3:32:38 PM9/30/07
to iPhoneWebDev
onorientationchange is a new event with the latest firmware update.
Works like a charm.

83i...@gmail.com

unread,
Oct 2, 2007, 4:02:03 AM10/2/07
to iPhoneWebDev
Very good, thanks!
But can I know the current iphone orientation?

Raffaele Sena

unread,
Oct 2, 2007, 6:44:08 PM10/2/07
to iphone...@googlegroups.com
just check for window width > window height (for landscape)

daklik

unread,
Oct 3, 2007, 10:47:51 AM10/3/07
to iPhoneWebDev
You have the orientation property on the window object:
a value of 0 means portrait, +90 or -90 means landscape.
Reply all
Reply to author
Forward
0 new messages