O'Reilly logo

Beginning iPhone Development with Swift: Exploring the iOS SDK by Jeff LaMarche, Fredrik Olsson, Kim Topley, Jack Nutting, David Mark

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    5

Rotation and Adaptive Layout

The iPhone and iPad are amazing pieces of engineering. Apple engineers found all kinds of ways to squeeze maximum functionality into a pretty darn-small package. One example of this is how these devices can be used in either portrait (tall and skinny) or landscape (short and wide) mode, and how that orientation can be changed at runtime simply by rotating the device. You can see an example of this behavior, which is called autorotation, in iOS’s web browser, Mobile Safari (see Figure 5-1). In this chapter, we’ll cover rotation in detail. We’ll start with an overview of the ins and outs of autorotation, and then move on to different ways of implementing that functionality in your apps.

Figure 5-1. Like ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required