iOS dev
iOS dev

Reputation: 2284

How to convert xcode 4.1 iPhone app in to ipad app

Upvotes: 0

Views: 672

Answers (3)

Christoph
Christoph

Reputation: 2063

Changing the project preferences to universal gives you the possibility to specify a second MainWindow.xib in the info.plist file (Main Nib file base name (iPad)) which is the starting point for your iPad Interface. At this point running the app on an iphone would load your original interface and running on an iPad gives you the blank window once you created the corresponding blank MainWindow file.

Edit: You need also a second AppDelegate that holds the reference to your new window.

Upvotes: 1

Engeor
Engeor

Reputation: 328

Depends how your app is build. If you are using Builder in XCode you can simply create new xib for each controller/view you have in app and name it with suffix ~ipad.

So if you for example have MyController.xib you will create MyController~ipad.xib and your controller will be loaded from this file automatically when run on iPad.

Upvotes: 1

twilson
twilson

Reputation: 2062

Your best bet would be to create two new projects, one for iPhone, and the other universal and see what differences are in place there, especially the app delegates.

Quite a lot of the things won't be needed, however the app initialisation need some consideration, and most views tend to happily scale up to ipad resolutions without much or any additional work.

That was how I added iPad support into one of my apps I was writing anyway.

Upvotes: 1

Related Questions