开发者

Is there any difference between iPad 2x mode and iPhone4 Retina display (for developer)?

Graphics development for iPhone4 and old iPhones was changed in several ways:

  1. The concept of point was introduced to replace pixel.
  2. Methods of UIImage will load high resolution resource files with @2x in the file name.
  3. Scale factor was added to UIScreen, UIView, UIImage, and CALayer classes.

So if we handle CGImage carefully, it's not hard to support the high resolution Retina display of iPhone4.

I have several questions about non-native iPad app in iPad 2x mode:

  1. Could all the changes from old iPhone to iPhone4 (@2x resources auto loading, point concept, scale factor) be applied to iPad 2x mode.

  2. The scale of app on iPad c开发者_JS百科an be changed. How can I handle it?


With The new iPad sporting Retina Display you will need another set of images for some items such launcher icon, launch images (splash screen).

For example:

The launcher icon for Retina Display on iPhone/iPod Touch is 114 x 114 but on The new iPad the same icon for Retina Display is 144 x 144.

Other example:

On an Universal App, for the launch images (splash screen) you'll need an image set for phones/music players:

  • Default.png (For old devices)
  • Default@2x.png (For phones/music player with retina display)

Another image set for Tablets:

  • Default-Portrait~ipad.png (For original iPad and iPad 2)
  • Default-Portrait@2x~ipad.png (For the new iPad with retina display)
  • Default-Landscape~ipad.png
  • Default-Landscape@2x~ipad.png

The "@2x~ipad" will work on the new iPad in the same way "@2x" worked for the phones and ipods, but will be relative to the old iPad image set.


Unfortunately, all of those content scale functions were added in 4.0, so I don't think there's any way to use the iOS4 stuff that you're asking for.


The iPad 2x mode is just a way to run iPhone-only apps on the iPad's larger screen. If you want to take advantage of iPad's larger screen, all you have to do is create a universal binary (i.e. one that contains views for both iPhone and iPad).


There is no way to get the iPad 2x mode to display your iPhone retina level content automatically—Apple do not support this... presumably as they want people to put effort into developing iPad-specific interfaces for their apps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜