LilMoke
LilMoke

Reputation: 3444

Separate storyboards for iPhone/iPhone Retina/iPad/iPad Retina

I have a question that may sound odd, but being somewhat of a newbie, I am guessing no question is a stupid question...

Do I need separate storyboards for all four devices?

Right now I have two storyboards, one for iPhone and one for iPad, but what I get my view frame it always shows the size of the device, not the retina device. So for example on the iPhone my view size is 320x460, and for iPhone Retina it shows the same... likewise for iPad.

Thanks

Upvotes: 5

Views: 2723

Answers (2)

angeldiaz
angeldiaz

Reputation: 26

You can differentiate the graphic content of your application, but the views / storyboard for the moment I do not think you can.

If you want to take advantage of the resolution of retina screens you can use the @2x trick.

This consists of the following, we give the example of the application icon_

  • Icon.png ( default icon for the iphone at 57x57 pixels )
  • [email protected] ( default icon for the iphone with retina display at 114x114 pixels )

  • Icon~iPad.png ( default icon for the ipad at 72x72 pixels )

  • [email protected] ( default icon for the ipad with retina display at 144x144 pixels )

This trick is useful for all your graphic content and no requires extra code when you make your interfaces and your code. When you have to specify the graphics file to be used, always specify the file which does not have the "@2x".

I hope that is helpful.

Upvotes: 0

LuisEspinoza
LuisEspinoza

Reputation: 8538

No, you don't. Yes it's the same resolution for the developer point of view. iOS will make all the adjustment. The only important issue is that if you use images in your app bundle (like tab icons) you have to add one for not retine a one for retina (with double resolution). For example if you have icon.png of 24x24px, you have to add [email protected] of 48x48px. iOS automatically will replace your icon for the "@2x" filename in retina divices.

Upvotes: 5

Related Questions