5

Enabling 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

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 was 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 iOS, you should be aware of some subtle differences when porting your applications over to the new device. This chapter examines two techniques you can use to port your existing iPhone apps to support both the iPhone and the iPad.

Get Beginning iOS 5 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.