Here's a neat little goodie for you web developers: Apple has posted some sample code showing how to handle iPhone or iPod touch orientation events using JavaScript, HTML, and CSS. Using this, you can pick up orientation events in Mobile Safari that occur when a user turns their iPhone.Apple provides a sample iPhoneOrientation.js file that implements a typical handler, window.onorientationchange. CSS attributes can dynamically change how the webpage appears.
You can download the file at the Apple Developer Connection page.
You can download the file at the Apple Developer Connection page.
No comments:
Post a Comment