Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the 1990s, Java gained immense popularity because developers could write one application that ran on multiple operating systems. In the early 2000s, HTML5 is doing the same on the mobile front, letting developers implement a single application that runs on the desktop and multiple mobile operating systems.
In this chapter you will see how to get Canvas-based applications running on mobile devices; specifically, you will see how to configure the magnifying glass and paint applications discussed earlier in this book to run, indistinguishably from native applications, on the iPad.
The application shown in Figure 11.1 is the magnifying glass application discussed in Section 4.10, “A Magnifying Glass,” on p. 321, running on both Mac OS X and iOS5 on the iPad. Visually, the application is identical on both operating systems, except for the title bar. The application supports both mouse and touch events, so the same code runs on either operating system.