Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mmalsn

macrumors newbie
Original poster
Jul 20, 2011
13
0
how can i develop app for both iphone and ipad ?

just in general i mean about images and design and something like that?

thanks.
 

jnoxx

macrumors 65816
Dec 29, 2010
1,343
0
Aartselaar // Antwerp // Belgium
If you click in Xcode project, on your target, and make it instead of an iPhone/iPad -> Universal build (this is Xcode 4.0+).
Then you get 2 MainWindow.xib's, one is for iPhone, other is called iPad.
Then you can just make 2 groups in your project, one for iPhone, one for iPad.
And then decide what you gonna do, are you gonna make shared classes, or one seperate for both.
And if your class doesn't do that much, and only needs 1 change depending on what device you are, there is some code for that.

Code:
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
NSLog(@"woopwoop i'm a phone");
} else {
NSLog(@"i'm a pad dawg");
}

About images, you can set them via code, and you have to provide the right resolutions, it's a bit of a hussle in the beginning, but it works perfectly :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.