Sylvain Ollivier
Sylvain Ollivier

Reputation: 133

What is the best way to handle iPad/iPhone views?

I'm developping an iPhone/iPad application and I want to make specific views for both iPad and iPhone. I was wondering what was the best way to select the handle the view selection.

Should I create a MainViewController with a custom push method which handle the selection (iPad or iPhone version of the view) ? What is the best way to do that ?

Upvotes: 0

Views: 148

Answers (2)

Shaheen M Basheer
Shaheen M Basheer

Reputation: 1010

If you want to create specific view for iPhone and iPad,when you create a new project -> Select Device Family as "Universal" .2 xib files will be created. One for iPhone and another for iPad respectively which you can use to design iPhone and iPad interface.

Upvotes: 0

Sanjay Chaudhry
Sanjay Chaudhry

Reputation: 3181

If your iPhone nib is named, MyApp.xib, name the iPad nib to "MyApp~ipad.xib" (mind the lowercase "P"). The latter one will automatically be loaded for iPad.

Upvotes: 1

Related Questions