Reputation: 28907
I have an iPhone application fully finished and it doesn't rely on any specific iPhone functionality that would not be used on an iPad (for example, my iPhone app doesn't use Text Messaging). I use xcode and I use the iPhone simulator to test my app.
How would I go about making an iPad version? Do I need to make a fully new xcode project? I know there is an iPad simulator, but how do I create an iPad version. Also, when I submit to apple, how do I specify the iPhone version and the iPad version.
For instance, in my code I have a UITableView in a particular controller that is size 320x480 (to fit the iPhone). How would I specify an iPad version of that UITableView?
Can anyone explain/give me insight? Thanks!
Upvotes: 1
Views: 305
Reputation: 4285
In Addition to the UIUserInterfaceIdiom stuff, you may also want to review the iOS Application Programming Guide paying specific attention to the hardware sections. Also if you haven't seen it this document specifically talks about building universal apps. Unfortunately there's not a perfect one stop shop, but it's not terribly hard, especially if you already have an app and are ready to port.
Hope that helps.
Upvotes: 2
Reputation: 50697
I would start off creating iPad versions of your existing XIB files.
As far as code, I have something like this setup:
#define IDIOM UI_USER_INTERFACE_IDIOM()
#define IPAD UIUserInterfaceIdiomPad
and I use it like something this:
if(IDIOM == IPAD) {
/* iPad Interface */
tbleView.frame = CGRectMake(0,0,1024,768);
} else {
/* iPhone Interface */
tbleView.frame = CGRectMake(0,0,320,480);
}
Upvotes: 1