Chapter 5. Autorotation and Autosizing

The iPhone is an amazing piece of engineering. Apple engineers found all kinds of ways to squeeze maximum functionality into a pocket-sized package. One example is the mechanism that allows applications to be used in either portrait (tall and skinny) or landscape (short and wide) mode and to change that orientation at runtime if the phone is rotated. A prime example of this behavior, which is called autorotation, can be seen in iPhone's web browser, Mobile Safari (see Figure 5-1).

Like many iPhone applications, Mobile Safari changes its display based on how it is held, making the most of the available screen space.

Figure 5-1. Like many iPhone applications, Mobile Safari changes its display based on how it is held, making the most of the available ...

Get Beginning iPhone Development: Exploring the iPhone SDK now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.