O'Reilly logo

Beginning iOS 4 Application Development by Wei-Meng Lee

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. Multi-Platform Support for the iPhone and iPad

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Modifying a project's Targeted Device Family setting to support both the iPhone and the iPad

  • How to programmatically detect the device being run

  • How to create a Universal application

  • Creating separate targets for different devices

Besides the iPhone and iPod touch, another device using the iOS is the iPad. Out-of-the-box, the iPad will run your existing iPhone applications using the same screen size that is available on the iPhone and iPod touch — 320 × 480 pixels. Therefore, your applications will utilize only a portion of the screen. However, applications running in this default mode do not do justice to the much bigger screen real estate afforded by the iPad. Clearly, this is merely an interim size that can be used until developers port their application's UI to the much bigger iPad screen. In order to support the different devices, you need to modify your applications so that they can take advantage of the capabilities of each device type.

Though the iPad is also running the iPhone OS, you should be aware of some subtle differences when porting your applications over to the new device. This chapter examines three techniques you can use to port your existing iPhone apps to support both the iPhone and iPad.

Note

At the time of writing, the iPad runs an older version of the iPhone OS, 3.2; whereas the iPhone 4 and iPod touch run the newer 4.0. Apple has announced that the iPad will be running ...

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