Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5: Autorotation and Autosizing

Chapter 5

Autorotation and Autosizing

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 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 autorotation 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.

images

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


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial