How can i specify image name for image view in 4 inch display like for retina size @2x is using with image name? Is there any special way to do this?
Asked
Active
Viewed 1,687 times
2 Answers
2
There's no difference for the iPhone 5. It's retina so it uses the @2x images, but there's nothing specific apart from the Default-568h@2x.png image you use to tell the operating system you're supporting the larger screen.
The only difference between the 3.5 and 4 inch iPhone is the size that [[UIWindow mainWindow] bounds]
(and related screen size elements) returns.

Jessedc
- 12,320
- 3
- 50
- 63
-
then should i need to increase the image height? for eg. Iam setting a background imageview which is having frame size (0,0,320,480). So if it in 4 inch display shall i change this frame size to (0,0,320,560) ? – Dev Oct 03 '12 at 07:23
-
What I've done is create conditional background-sizes depending on the screen resolution. Check out these answers for some great information: http://stackoverflow.com/questions/12396545/how-to-deal-with-iphone-5-screen-size – Joakim Engstrom Oct 03 '12 at 07:46
0
@2x images are meant for retina display i.e. iPhone 4S as well as iPhone 5.
For selecting different images for iPhone 4S and iPhone 5, I first check which device model am I using the link:
Detect the specific iPhone/iPod touch model
Then accordingly you can set images for iPone 4S or iPhone 5....
-
A much better way is to use the screen/window size, detecting the device more than detecting iPad/iPhone is a fragile way to support multiple screen sizes. – Jessedc Oct 03 '12 at 10:12