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).
Related
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
In my IOS app, I'm trying to incorporate images on UIBarButtonItems. I found some icons on IconFinder, but they appear pixelated when I specify the image using the Storyboard (I exported 22x22 pixel pngs).
It appears fine in the storyboard but pixelated on my device / in the simulator:
How can you ensure that UIBarButtonItem images are not pixelated? I've read that they should be 22x22.
They should be 22 x 22 points. You are dealing with pixels.
You need an #2x image that is 44 x 44 as well as an #3x image that's 66 x 66 if you're optimizing for iPhone 6 Plus.
Here's a helpful link about the difference between points and pixels
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
Quick question.
If designing an image for a UINavigationBar do I simply design one image 320 x 64 px and then scale accordingly? So:
320 x 64 for iPhone
640 x 128 for iPhone 4/5 (and add the #2x)
960 x 192 for iPhone 6 (and add the #3x)
Something which is confusing me is the various display sizes and how large to make the images:
I've think I've got the display resolutions correct as:
iPhone 320 x 480
iPhone 4 as 640 x 960
iPhone 5 as 640 x 1334
iPhone 6 as 750 x 1334
iPhone 6 Plus as 1242 x 2208
If I don't just create one image and scale it up, do I have to create 3 images for each phone?
e.g. iPhone 4:
640 x 128 for Standard
1280 x 256 for #2x
1920 x 384 for #3x.
And then the same for all the other phones?
I'm sure that can't be correct, but somewhat confused about this at the moment.
Thanks in advance for any help.
I would not recommend scaling an image up, as this will result in a marked loss of graphical fidelity (aka. 'jaggies' or blurriness) on higher resolution devices. If anything, you should err on the side of scaling down.
Your options:
Design images for each logical coordinate space. For a navigation bar, for example, this would entail having bar backgrounds in standard, 2x and 3x sizes. More, if you wish to support navigation bars in landscape mode on an iPhone.
Note, however, there is no guarantee how wide devices even within
the same logical coordinate space (ie. iPhone 5s and iPhone 6) will display a
navigation bar, so you will probably want to use the UIImage method
resizableImageWithCapInsets: to create an image that stretches all the way across the navigation bar no matter how wide it is.
https://developer.apple.com/library/ios/documentation/uikit/reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets:
It's worth noting that if you're writing for the iPhone you could probably forgo the use of 1x images as no iPhones that use 1x images are supported any longer. On iPad, though, you still have to contend with the iPad 2 and original iPad mini.
Create a 3x image and use it for everything. Allow iOS to automatically scale it down as needed. This could introduce some graphical flaws (although not nearly as bad as scaling up, and possibly not even noticeable) and is a bit less efficient - ie. it consumes more memory and theoretically could take longer to load. This is somewhat inelegant and I wouldn't recommend it.
Your last option is to embrace the flat design principles in place since iOS 7 and simply forgo the use of detailed/textured elements when possible. As the sizes and densities of iOS device displays increase, you may find that this results in fewer headaches for both you and your designer - and it might fit better with the iOS 7+ design aesthetic.
Another thing...
I'd recommend learning about the different between points and pixels. This will help get your head around a lot of this.
https://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7
Basically, you don't need to design for different phones, you need to design around 3 (well, really 2 at this point) logical coordinate spaces. Through the use of resizable images as described above and - optionally - creating larger images to fill up more space on larger devices, you shouldn't really have to create more than 2-3 versions of any image.
I want to customize my NavigationBar button and using my own images.
The question is what the size should be?
I found that the button size should be 40*40, so the image should be 80*80 for retina?
These are the sizes that the documentation recommends for custom icons now.
#2: 50 x 50
#3: 75 x 75
Create two images of the above pixel sizes and then add them to a new image set in your Assets.xcassets file. (Apparently the #1 size is no longer needed.)
Alternatively, you could use a universal vector image (pdf) (see here and here). This has been my preference recently.
Related answer
iOS how to set app icon and launch images
Apple updated their Human Interface Guidelines Docs. Now the recommended sizes for creating custom icons for Navigation Bar and Toolbar
#2x - 48px × 48px (24pt × 24pt #2x)
#3x - 72px × 72px (24pt × 24pt #3x)
The typical standard sizes (non-Retina) are 22px by 22px, while the 2x (or Retina) sizes are 44px by 44px.
You should prepare 3 images icons for each tab bar item (1x, 2x and 3x).
First create the 3x at 75w 75h pixels (maximum: 144 x 96) and save it as iconTab0#3x.png.
Then resize it to 50w 50h pixels (maximum: 96 x 64) and save it as iconTab0#2x.png.
Finally resize it to 25w 25h pixels (maximum: 48 x 32) and save it as iconTab0.png.
Now all you need is to select those 3 images at your finder and drag them to your image assets.
human interface guidelines
Apple docs were updated and now the recommended size is 25pt x 25pt.
Please refer to documentation here.
Here are the current sizes:
https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/custom-icons/
"Toolbar and navigation bar - between 24x24 (#1x) and 28x28 (#1x)".