Graphics Programs Reference
In-Depth Information
When a view is autorotated, it changes its size (the width becomes the height and vice
versa). This is why the mask is called an auto
resizing
mask. Another time a view's size
must change is when the size of the device does. For instance, if
HeavyRotation
was a
universal application
(that runs on both the iPad and iPhone device families), then the in-
terface for the iPad version would have to fit the larger screen size.
When a universal application launches on the iPad, the window is resized to fit the larger
screen. Thus, the subview of the window (the view controller's
view
) and its subviews
are also resized. The autoresizing masks will do the same job here as they do when rotat-
ing the device to preserve the interface of the application.
Let's make
HeavyRotation
a universal application to see this happen. Select the project
from the project navigator. Then, select the
HeavyRotation
target from the editor area.
Select
Universal
from the
Device Family
pop-up menu, as shown in
Figure 8.9
.
Figure 8.9 Universalizing HeavyRotation