How to support different screen resolutions in iOS - ios

I want to know the icon sizes for iPhone and iPad.
How can i support different screen densities in iOS.
In my app icon are blur in iPad and iPhone5.

App Icon Sizes for iphone and ipad:
iOS 5 and 6 - 57pts at 1x and 2x:(57x57,114x114)
iOS 7 and 8 - 60 pts at 2x and 3x:(120x120,180x180)
iPad - 76pts at 1x and 2x:(76x76,152x152)
You can read apple documentation to get better understanding.

You have to make your images suit the resolution
Check this LINK

You may want to take a look at this:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1
Basically: for all included images you should provide two files, 1 named ie "picture.png" and the other "picture#2x.png" and iOS which to use for itself.

You may get different icon sizes at following link :
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
Set Project icon images as #1x,#2x and #3x, it will automatically get images as per iOS device resolution.

Related

How to force universal app on iPad into scale mode?

I created an universal iOS app. On all iPhone variants I want native resolution without scaling, so I created splash screen images for all available sizes in images.xcassets/LaunchImage.launchimage and set them all in Xcode:
Now, this works very well for all iPhone versions up to the biggest iPhone 6 Plus.
On iPad (with high pixel density) though I don't want native resolution. Instead I want it to scale the app (even if it looks a bit blurry then, but that's ok).
How would I do that?
In image assets you have to provide proper size for each launch screen, You can not use the same image for two devices in launch-images ( unless you have two copies of the same image ).
If you want to make app-size smaller, implement launch screen, set its background color to your desired background color and put your logo in the center of it. You can now remove iPhone 6,6Plus images from image assets, but you still have to provide launch images for iOS 7 devices (old iPhones / iPad ).
Don't use the Asset Catalogue. Create a LaunchScreen.xib , add a UIImage inside the view. Open the attribute inspector in the right hand panel and set the view mode to Aspect Fill.
The solution was quite easy, I simply changed project type from "universal" to "iphone" and that did the trick!

Disable native resolution ONLY for iPhone 6 Plus

I need my app to not use iPhone 6 Plus' native resolution and rather scale up from iPhone 5/6.
I have removed the Launch Screen File and cleared "Retina HD 5.5" from the Launch Image, yet when people run it on iPhone 6 Plus, the app is still using its native resolution.
Note that removing the "Retina HD 5.5" was sufficient to bypass iTunesConnect App Screenshots validation for iPhone 6 Plus, yet the app itself is not honoring that.
Is there anything else to remove to eliminate iPhone 6 Plus native resolution?
There is not. You can only support 6 and 6 Plus together or none of them. As soon as you use the Launch Screen File Xcode assumes you want to support them.
I really don't know why you want to do that, but there are some tricks to resize fields and buttons (I assume you want to do that)
You should be able to determine the screen size/native screen size so you can resize your CGRects for example.
https://stackoverflow.com/a/4779415/2826164
create an global function or variable to multiply your current width and heigth by, for example native width of 6+ = 1242*0,60306 = 750 native.
i'm not sure if you need 1080 or 1242 because of downscaling
More info about iphone 6+ resolution

Image sizes required to support all iPhone devices

What all splash screen images do we required to create an iOS application? I want to give support all the devices which supports iOS8. Trying to find out working of Images.xcassates and how to add splash images.
I want to support iPhone 4, iPhone 5/5s/5c, iPhone 6/6+, iPad.
What is the naming convention required to set LaunchImage? I just saw 1x, 2x, Retina 4 2x, and 3x in xcassates. But not getting what file names it required.
Like for non retina and and retina we simply twice non retina image for retina and name it like xxx#2x.png for retina and xxx.png for non retina.
Not getting apple document regarding this.
Thank you.
Now in New versions Image name for splash is not required. you can just drag and drop images in "LaunchImage" image asset. Please check below screenshot.
On right side you can see it's required image size in Expected Size : 1242x2208 pixels.
just drag same size image there and you are done.
Maybe this will help you.
There is a default black LaunchImage in xcassets, you jsut have to dragndrop your images into corresponding canvas. XCode will automatically name those images for you.
Note that in xcassets you can choose to see canvas for only iOS 8, iOS 7 or more, iOS 6 or more, etc.
Using image.xcassets, you do not need to follow naming convention. You just drag and drop the image to placeholder inside the image.xcassets. Xcode will handle that for you.
To support multiple device, you can easily match with the naming below the placeholder.
eg.
iPhone Portrait iOS7,8: 2x: iPhone4, Retina 4: iPhone5/5s/5c
For iPhone 6/6+, you can enable iOS8.0 iPhone checkbox on the right panel.
You can also see the expected sizing on the right panel.

app can't distinguish screen size [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to deal with iPhone 5 screen size?
How can I add support for 4-inch iPhone 5 displays to an iOS app in Xcode?
Is this even possible with the latest public Xcode release, v4.4.1?
Add a new launch image named Default-568h#2x.png to your project and it will work!
If your application is iOS6 only, the easiest way to make views that layout correctly in both 3.5-inch and 4-inch iPhone 5 designs is to use AutoLayout in your XIBs to make them adapt their size automatically (See the WWDC'2012 video sessions about that). If your application must support versions prior to iOS6, then you can still use AutoResizingMasks on your views to make them resize themselves to adapt to both 3.5 and 4 inch screens.
Then for your application to support the 4-inch display and take the whole screen when launched on an iPhone 5, simply add a "Default-568h#2x.png" launch image to your project.
The simple presence of this launch image will make your application launch full-screen on iPhone 5 instead of having black bands at the top and bottom.
Short answer : use the new launch image slot ( the Retina 4-inch ) one in XCode->Targets->Summary->iPhone/iPod Deployment Info
I have an OpenGL ES 2 app that despite all options I checked, nothing worked. Creating a new GLGame project adds black launch images for Retina 3.5 inch and Retina 4 inch. Despite every other comparison to project settings or .plist file I found nothing else to say "make it available for iPhone 5". I sure hope this changes in the future.

iOS image size for iPhone and iPad

I am developing universal app for iOS,
I am using Autolayout feature in my app,
I have one doubt:
I want to apply background image in my app,
How many background image i will have to make ??
and what will be the naming conventions of the images ?
so that iPhone automatically takes corresponding images according to device.
Like we gives on launch images, default#2x.png, Default-568h#2x.png, Default-Portrait#2x.png and device automatically understands it's corresponding images.
you need 2 types of images for iphone and ipad.
For ipad you just need to add ~ipad before .png. e.g. image.png for iphone and image~ipad.png for ipad.
Do the same for Retina display images also.
e.g.
iPhone Retina: image#2x.png
iPad Retina: image#2x~ipad.png
What should help in your case is Asset Catalogs, which are by far the best way to manage assets for multiple devices.

Resources