This question already has answers here:
Image resolution for new iPhone 6 and 6+, #3x support added?
(4 answers)
Closed 8 years ago.
So I've just started using Xcode to make a game for iOS and I've been struggling with the whole screen size/background image sizes...
I've been reading a lot of questions like this, but I don't understand what is meant by #3 and #2 etc?
I was under the impression if I account for the size of iPhone 6+, it would all just be scaled down/autofit iPhone 6... or visa-versus.
If you plan to support for only iOS 8 and onwards on your game then you do not have to give different images for different device types.
As per the WWDC 2014 video titled "What's new in interface builder" Apple introduced support for Vector Images. You have to give the the image at 1x resolution and Xcode will create the required images at compile time. I found this link useful for further understanding.
http://martiancraft.com/blog/2014/09/vector-images-xcode6/
On the other hand if you want to support iOS 7 also then you will have to give 3 sets of images for #1x, #2x and #3x. These numbers are scaling factors. Apple introduced newer devices with higher resolution it became necessary to give higher resolution images to keep up with the device resolution. So these sets of images are basically to be be displayed on devices with different resolution.
#1x - non retina devces like iPhone 3GS. iPad,iPad2 (not a complete list)
#2x - iPhone 4s, iPhone 5,iPhone 5s,iPhone 6,iPad 4 (not a complete list)
#3x - iPhone 6+
Related
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?
How to create application which will work on iphone4 as well as iphone5? I am trying to understand the hurdles behind it. But I am not able to find any apple doc related to this? What kind of things we need to do for this to make app runs well on iPhone4 as well as iPhone5.
Thank you.
Please refer images bellow!
No if you refer iPhone5 image, you can see black padding on top and bottom. But if you see iPhone4 image there is no padding. I trying to ask that How can we create iPhone application which will run on iPhone4 and iPhone5 as there is height difference in iPhone5. I am trying to create new application which needs to run on both iPhone4 as well as iPhone5. I am using xcode 4.5
For the iPhone 5 you will need to support iOS 6.
Dealing with the height differacne can be solved by make the appropriate height.
You can set the autoresize mask or if you wan to support iOS 6 only, autoLayout.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?
How to deal with iPhone 5 screen size?
With 5th generation devices in the market having bigger screen, we need to have a bigger launch image (image that is shown when app icon is tapped). How would app make the difference like when to use the normal image and when to use the bigger image based on the device type?
I see a warning in my project when I build it for iPhone 6.0 simulator tap on which throws the below alert:
You need to add a launch image named Default-568h#2x.png. The compiler checks for this image and validates it. If the image is validated, your app is ready for iPhone 5 - otherwise not. Once you have the right image, follow the steps outlined in this post:
How to develop or migrate apps for iPhone 5 screen resolution?
If you are having issues with the images being used INSIDE the app, and you want to support iPhone 5 and pre-iPhone 5 devices, use this:
Dealing with different size images in a xib for iPhone5 versus iPhone4?
For short: If you want to support iPhone 5 screen you must supply launch screen for the 4" screen otherwise your app would run on 3.5" on the 4" screen.
If you put the 4" launch image that one would be used on iPhone 5 and the 3.5" one on iPhone 4 (could be different).
Please see my detailed explanation here.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to detect iPhone 5 (widescreen devices)?
Do any adjustments need to be made for an app started in development prior to the iphone 5 in order for them to work on the iphone 5's larger screen?
If so, what are these changes, or where can I find what to change? google hasn't been too helpful so far.
Thanks
After adding the Default-568h#2x.png launch image, follow the steps outlined in this post:
How to develop or migrate apps for iPhone 5 screen resolution?
If you are having issues with the images being used INSIDE the app, and you want to support iPhone 5 and pre-iPhone 5 devices, use this:
Dealing with different size images in a xib for iPhone5 versus iPhone4?
You need to add a default launch images with 640x1136px named Default-568h#2x.png to support the iPhone 5 screen.
First, you have to have a 640x1136 launch image (with -568h#2x.png suffix) to make it compatible with the iPhone 5, but to fully make use of the larger screen, there are a many ways to do it. I find the easiest way to do it is to make two separate storyboards, making a new one for the iPhone 5, while maintaining the one you have already used for the iPhone 4S, 4, etc. Using two storyboards removes the necessity for AutoLayout; enabling AutoLayout, it is good to note, also removes iOS 5 compatibility. Use the code in this answer to get started.
Depending on how your app views are laid out, you may not need to make too many changes. If you have views that resize and are anchored correctly, such as scroll views or table views, they will expand to fill the additional space on the iPhone 5 screen. You need to add an additional launch image for the new screen size too.
the iphone 5's screen is taller so you'd need to have images with a resolution of 1136x640 also included in your images folder. (add -568h#2x at the end of image's filenames)
also, everytime you will adjust your sprites and everything else that goes on the screen, you will need to account for the iphone 5 separately, just like you account for the ipad and the iphone (non retina and retina).
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How to accommodate for the iPhone 4 screen resolution?
What is the best way to include Retina Display Images on an iPhone app. Are there issues with the iPhone 3G or older iPhone with higher res images?
Include a hi-res version of your image named as "image#2x.png" (where "image.png" is the normal resolution). When you access your image using [UIImage imageNamed:#"image.png"], the correct one will be chosen automatically. Devices without retina display won't load the hi-res version, so there's no memory overhead.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Running app built in iOS4 on iOS 3.0, why is everything huge?
My images in my app are all 2x (or more) the size that they appear at. But for some reason, some of these images are appearing at their original size on the screen, when testing on a device, and so appear twice as large as they do in Interface Builder and on the simulator. And some are appearing at the size they should be.
Any ideas why this could be? My iPod Touch is 1st generation, so it's on 3.0 software.
The app probably only includes double resolution images for the Retina Display, and they're not suffixed with "#2x" to indicate that they're double.