Suffix for Retina Images in iPhone 5
Asked Answered
S

3

6

I have some image files for iPhone 5 size 640x1136, i have previously implemented retina images for iPhone 4 & 4S using @2x suffix, so what will be the suffix for images in iPhone 5, we can user the same as is @2x or it has to be changed.

Souse answered 20/9, 2012 at 17:20 Comment(0)
P
2

See my answer here. Some useful macros to help you with dealing with images.

Paxon answered 25/9, 2012 at 20:21 Comment(0)
P
3

It’ll still use @2x images where they’re available. There’s a -568h suffix you can use for the launch image, as in [email protected], but that’s currently the only place it’s supported; see Leo’s answer for a way to get that working elsewhere.

Plunge answered 20/9, 2012 at 17:25 Comment(1)
The -568h suffix only works for the launch image, it will not work for other images. See my answer for macros that will help you.Stereoscopic
P
2

See my answer here. Some useful macros to help you with dealing with images.

Paxon answered 25/9, 2012 at 20:21 Comment(0)
G
2

For the iPhone Retina 4-inch (iPhone 5) it's still the @2x suffix because the density is the same as the iPhone Retina (iPhone 4 and 4S). The screen is bigger but have the same density.

The -568h suffix will work only in for the default image because it's the only place you really need it (just to tell the system that your app have been optimized for this new screen size, and it can stretch your views).

The naming convention Default-xxx.png is just here to provide the right image while the app is launching but I think it's non sense to try to replicate the same to load other images in imageViews. It's like the Default-(landscape|portrait).png on iPad. You never need this convention to load images yourself.

The only rule is:

  • @ is for density (2 density exist right now, normal and 2x)
  • ~ is for device (2 different devices exist right now, iphone and ipad)

To adapt images/imageView on the 4-inch iPhone you should play with your imageView content mode and the autoresizing configurations.

Gluconeogenesis answered 19/12, 2012 at 14:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.