Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
With a bit of clever programming, the iPhone’s onboard accelerometer can make objects “move” around the screen, responding in real time to the way the user tilts the phone. Recipe 9-10 builds an animated butterfly that users can slide across the screen. Figure 9-5 shows what the screen looks like as the application runs and the user interactively controls the butterfly’s location.