I am laying out an interface in code within a view controller and it appears that I need to provide explicit sizing even for standard, simple widgets like buttons and labels (one would think they have intrinsic dimensions).
Does Apple publish official standard dimensions for these widgets?
How is this situation usually handled when interface builder is not being used?
For label there is not any standard dimensions but for buttons you should keep size of 44 X 44 px , so user can easily tap on it..
Make it easy for people to interact with content and controls by giving each interactive element ample
spacing. Give tappable controls a hit target of about 44 x 44 points. From
iOS Human Interface Guidelines - Apple Document
Check this standard-iphone-element-sizes blog.
I serached the document about iOS picture size, please see the document.
App icon resource sizes
Filename / Size of canvas (in pixels)
icon_512x512#2x / 1024 x 1024
icon_512x512 / 512 x 512
icon_256x256#2x / 512 x 512
icon_256x256 / 256 x 256
icon_128x128#2x / 256 x 256
icon_128x128 / 128 x 128
icon_32x32#2x / 64 x 64
icon_32x32 / 32 x 32
icon_16x16#2x / 32 x 32
icon_16x16 / 16 x 16
And in the program, follw iphone screen size,
width - 320
heigh - 480, so base on these sizes, you can adjust your picture.
(especially, twice the resolution for iPhone, 640*960 is nessary!)
Related
In my Delphi Rio iOS project, when I go to Project options > Icons > Ipad I can see Application icon (83.5x83.5) but what does it mean 83.5x83.5? It's not possible to make an image of 83.5x83.5 pixels, so what is the desired pixel size?
When I look the dimension of C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\Artwork\iOS\iPad\FM_ApplicationIcon_83.5x83.5.png
It is 83 x 83 pixels, not 83.5 x 83.5
Is there something wrong?
That is supposed to be iPad Pro icon for #1 scale. But iPad Pro does not have #1 scale, only #2 so this icon size is redundant in Delphi configuration - you can use 83 pixel size to keep Delphi side happy.
Real icon size for iPad Pro will be 83.5 * 2 = 167 pixels - and that size is supported by Delphi.
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).
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