So far you have been focusing on how to detect when a user performs taps, swipes, pinches and how to detect device shakes. We now move on to the really exciting stuff, not that what you have already covered is not exciting, but the iPhone's accelerometer is much more powerful than you think and is capable of giving you live data for all three dimensions of the (x, y, and z) axes when the phone is tilted.
The iPhone's accelerometer data is delivered via the
UIAccelerometer class and the delegate
accelerometer:didAccelerate method which provides you with the data for each of the three axes, each being of
UIAcceleration class. Each of the values returned has a range between -1 and +1 with 0 being the middle ...