I would like to add images to each one of my tab bar items. According to
iOS Human Interface Guidelines the custom icons should have the following sizes:
In Xcode for each image set it is required to prepare 3 images with different resolutions (1x, 2x and 3x). In this guidelines it is not noted what must be the sizes for these images.
My question is according to ios guidelines what must be the sizes and resolutions for 1x, 2x and 3x images?
i think you should see this document
https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/custom-icons/
#1x : 25 x 25 (max: 27.67 x 27.67)
#2x : 50 x 50 (max: 56 x 56)
#3x : 75 x 75 (max: 83 x 83)
50 x 50 px is 2x, 75 x 75 px is 3x, so 1x is 25 x 25 px
Related
I have a logo image which should be displayed at 95 x 95 pt at iPhone6. This means the logo image has size 190 x 190 px since iPhone6 scales at 2x.
What is the correct size in px for this image on iPhone6Plus to have the same size?
iPhone6Plus scales at 3x this would lead to 285 x 285 px.
But, you can also computed it differently too.
Screen size in px:
iPhone6: 750 x 1334 px
iPhone6Plus: 1242 x 2208 px
Now you can compute:
190 / 750 = x / 1242
and solve this for x. This leads to 314 x 314 px.
So I get two different values for the correct image size on iPhone6Plus.
285 x 285 px and 314 x 314 px.
Which one is correct?
In Xcode you can now use vector pdf images. It will then scale them automatically when building. Support for this has become better in Xcode 7.
This will automatically generate all the sizes you need, this essentially future proofs your image assets.
a guide to vector assets
a link to all the awesomeness that assets can do now
The scaling on the 6+ is a little bit tricky.
You need to multiply the #2x size by 1.5.
Here is an example:
You got an image of 100x100px.
You need an image of 150x150px to be displayed on your iPhone 6+ in clear definition. (#3x)
Here is a useful link:
Icon & imagesizes on iOS devices
My app displays 2 buttons on the top and a car picture (1 of 4 possible) at the bottom:
Each image file has huge dimensions of 5616 x 3744 pixels and the app lags noticeably and also sometimes crashes (here fullscreen, Aspect Fill mode is used):
So I would like to scale down the image assets and include these files (for each of the 4 car pictures) in my app:
car.jpg
car#2x.jpg
car#3x.jpg
After searching around and I think I have to target the Rendered Pixels sizes, that is:
640 x 960 for iPhone 4
640 x 1136 for iPhone 5
750 x 1334 for iPhone 6
1242 x 2208 for iPhone 6 Plus
and I have yet to look up the dimensions of iPads
However my image view has 20 pixels insets (here fullscreen):
So I am not sure, which value to subtract from the widths of car.jpg, car#2x.jpg and car#3x.jpg.
Should I subtract 40 pixels from each file (that is 20 on the left and 20 on the right)?
just resize the image to the largest it will be (#3x) - it will be significantly smaller than it is at the moment, aspect fill will take care of the rest
I have 2 images.
The first one (#2x: 50x50, 72 pixels/ inches) is like this:
It look so ugly in Tab Bar:
The second one (#2x: 48x42, 72 pixels/inches) is like this:
Even it is smaller, it look good in Tab Bar:
I cannot see the different between the 2 images. Can you see and tell me why? I'm new in designing images for iphone. How can I design good image for tab bar? Here you can download the images.
Now you can set that image size according to the devices you are using
Tab bar icon (optional)
iPhone 6 Plus (#3x)
About 75 x 75 (maximum: 144 x 96)
iPhone 6 and iPhone 5
(#2x) About 50 x 50 (maximum: 96 x 64)
iPhone 4s (#2x)
About 50 x 50 (maximum: 96 x 64)
iPad and iPad mini (#2x)
About 50 x 50 (maximum: 96 x 64)
iPad 2 and iPad mini (#1x)
About 25 x 25 (maximum: 48 x 32)
According to the screenshot, I am suspecting image size.
I can't tell the exact reason why because never seen document regarding that found yet.
But in the practical experience those somewhat "distort" border problem happens when the image size and the control size are different even it has 1 pixel differences.
For example,
My UIImageView size is 32x 50, and my #2x image file for that imageView is 64 x 101. This can be cases because when we slice down, original image can have this pixel differences and we keep it for aspect ratio.
In this case, the size can be said 32 x 50.5 which is actually a bit difference and then, the image is showing "distort" or "blur" at it's border
Solution is just change it's image size as required.
After hours of researching finally I found out the reason. It's so silly of myself but I have to post this with hope that it will save time for other iOS developers who also want to design their own app:
Basically when exporting images to be used inside your app, your need to export with with PNG-24 type. That's all. (See image below as an example).
For example, I have a 100*100 size imageview or button, and I want to set its image or backgroundImage with a local .png file. Based on my understanding, I need to create 3 sets of images, i.e. 100*100 for #1x, 200*200 for #2x, 300*300 for #3x. I am not sure if my understanding is correct or not, can anyone help?
According to my understanding, if the image size is 100 * 100
#1x -> 100 * 100
#2x -> 200 * 200
#3x -> 300 * 300
There is something to understand. By creating 2x and 3x images, you can't expect exact same layout from each iPhone screen. The layout will be different from screen to screen. 1x, 2x and 3x image sizes dealing with only the pixel density of the screen.
Suppose you have an image which is 320 * 70 and you are creating
#1x -> 320 * 70
#2x -> 640 * 140
#3x -> 960 * 210
This will be your output in different screens.
For #3x image increase #1x image size by 3 times!
e.g.
15 x 15 = #1x
30 x 30 = #2x
45 x 45 = #3x
OR
100 x 100 = #1x
200 x 200 = #2x
300 x 300 = #3x
OR
15 x 10 = #1x
30 x 20 = #2x
45 x 30 = #3x
Yes, your understanding is correct.
A standard resolution image has a scale factor of 1.0 and is referred to as an #1x image. High resolution images have a scale factor of 2.0 or 3.0 and are referred to as #2x and #3x images. Suppose you have a standard resolution #1x image that’s 100px × 100px, for example. The #2x version of this image would be 200px × 200px. The #3x version would be 300px × 300px.
For more details you can check this link
https://developer.apple.com/ios/human-interface-guidelines/graphics/image-size-and-resolution/
Yes, you are right. But if you are using Assets you can do it all in one image with three slots for it
Use the assets catalog. Xcode will manage the #1x, #2x, #3x easilly, and tell you the dimensions for the images.
With it it's easy to manage the AppIcon and LaunchScreen images.
I have some images that i want to use on my iphone application. The problem is i think that the resolution is not right cause its not sharp at all when see it on the device. This is how it looks when i zoom in a bit on it:
The idea is to use this image as an image for a UITabBarItem.
Any help and general advice on how to make it sharper & better etc.. or how to make images for iPhone devices and make #2x, #3x etc??
Thank you
The tab bar icon size will be displayed about 25 x 25 point. (maximum: 48 x 32)
What does it mean?
Assume, you would like to use an watch.pngas the tabBar icon.
So you need three icon to achieve it:
watch.png -> 25 x 25 pixel (for iPhone without retina display)
watch#2x.png -> 50 x 50 pixel ((maximum: 96 x 64 - for iPhone 6, 5, 5s)
watch#3x.png -> 75 x 75 pixel (maximum: 144 x 96 - for iPhone 6 Plus)
For more details see [Human Interface Design]
Of course, you need a vector graphic image to achieve it and export it in the 3 size. A designer should know the details.
Or you can buy some icons (/download some free icons) in your topic. Several flat icon set are available, e.g.:
www.flaticon.com
http://www.pixeden.com/free-icons-set