This Wrox Blox explains touch input events and illustrates how to detect an orientation change, capture two-finger scrolling inputs, and simulate a drag-and-drop action when designing applications for the iPhone and iPod Touch. Web developers designing applications for Mobile Safari, the browser on iPhone and iPod Touch, are able to easily incorporate touch input event handling without writing any code at all. However, while page flicking and scrolling are easy to implement, Mobile Safari does not provide a way to trap or override most touch interactions, nor does it allow developers full access to all DOM events.
Perhaps the most important event handling constraint is that no events trigger until the user’s finger leaves the touch screen. However, because developers are able to trap for viewport orientation changes, they do have full programmatic control over their application when the orientation changes between portrait and landscape modes. As a result, you can adjust CSS styling and positioning based on the current mode.
Usage Rights for Wiley Wrox Blox
Any Wrox Blox you purchase from this site will come with certain restrictions that allow Wiley to protect the copyrights of its products. After you purchase and download this title, you:
If you have any questions about these restrictions, you may contact Customer Care at (877) 762-2974 (8 a.m. - 5 p.m. EST, Monday - Friday). If you have any issues related to Technical Support, please contact us at 800-762-2974 (United States only) or 317-572-3994 (International) 8 a.m. - 8 p.m. EST, Monday - Friday).