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
Related
I am trying to create a lunch screen image for my iOS app. But I am not sure whats the right size for it.
According to apple website for iPhone 6 the size should be 750 x 1334 (#2x) for portrait.
But my question is, how to create a launch screen image that will fit for all screen sizes such as iPhone 5, 5s, 6, 6 plus, iPads etc?
Whats the correct way of doing this?
Go to images.xcassets
there you can see launch image sizes.Just Enable iOS version from right side.
iPhone Portrait iOS 8:- 1242*2208 (5.5 inch)
750*1334 (4.7 HD)
iPhone Landscape iOS 8:-2208*1242 (5.5inch)
iphone Portrait iOS 7,8 :- 640*960 (#2x)
640*1136 (Retina)
iPhone Portrait 5,6 :- 320*480 (#x)
640*960 (#2x)
640*1136 (retina4)
But my question is, how to create a launch screen image that will fit
for all screen sizes such as iPhone 5, 5s, 6, 6 plus, iPads etc?
That will be very hard to do. The devices have different aspect ratios and the difference in size between say iPhone 5 and iPad Air is pretty big to use one image for all. If you want to use the classical launch screen with a screenshot, resizing one image won't look the same as the user interface on different devices. If you want a launch bitmap image you will need to supply all the necessary sizes.
Whats the correct way of doing this?
You can create either launch PNG image or launch screen as a storyboard.
For launch image, your project has an assets catalog. Either use existing or add new iOS launch image. The editor will show you all required sizes.
For a storyboard, your application probably already has LaunchScreen.storyboard. You typically won't create specific size or sizes here, but use auto layout that will resize the screen appropriately.
I'm building an app that works fine on iphone 5. When I look at it on a iphone 6 or 6 plus however, I see that the keypad is stretched, basically zoomed in. I'm using autolayout and storyboards.
What do I need to set in order to make the keyboard scale to a normal size?
You need to ensure that the app is optimized to run in the native resolution of these devices, rather than the zoomed compatibility mode. This can be done by setting a properly-sized launch image for the iPhone 6/6+.
These launch images will be labeled Retina HD 4.7 and Retina HD 5.5 in your launch images file, respectively. If you do not see these options available in your launch image assets, create a new launch image set and they should be there.
We have an app that is made for iPhone 4/5 and iPad/iPad Retina. The interface XIB files for iPhone do not use dynamic layout, and the code that places UI elements assumes a screen width of 320 points and a screen height of 480 or 568 (iPhone 5) points.
Due to a lack of time, we currently can't adapt the app for iPhone 6 and iPhone 6 Plus the "right way" (by changing the XIB files to use dynamic layout, and changing the code to work with variable screen widths/heights, then testing all the UI positioning again). But we easily can generate higher-resolution versions of the images.
I've experimented with the following: I don't add a Launch Image for iPhone 6 / 6 Plus; as a result, the app simply runs upscaled on an iPhone 6 Plus, and the screen still has 320 x 568 points. Everything runs fine, but the graphics are very blurry.
However, if I load a higher-resolution image (e.g. 1242 x 2208 pixels for the background) and set an UI element to use this image, then the image is sharp. (I'm testing with the simulator; don't have an iPhone 6 Plus available; I hope the behaviour is the same on a device).
Instead of adding the above workaround for each image individually, what I want to do is: at the start of the app, check the model of the device, and in case of iPhone 6 Plus, tell the app to use a custom image suffix. This suffix should be used for all images, not only those that are loaded via code, but also the images that are specified in XIB files. Is this possible?
Don't complicate yourself. just like retina with suffix #2x, you have to add #3x for iPhone 6 Plus.
I couldn't get used to introduced in Xcode 6 new layout system called Size Classes, so I decided to go by the old way creating two separate xibs for iPhones and iPads with ~iphone and ~ipad suffixes correspondingly.
Xibs designed for iPhones (with view size in IB equal to 320x568) works perfectly for new iPhone 6 and iPhone 6 Plus screens, and iPhone 6 plus even loads #3x assets if I provide those.
The first question, do I really have to add launch storyboard to indicate that my app supports new iPhones, or I can go without it?
If I add them all my xibs designed for iPhone 4s / 5 will stop working for iPhone 6 and 6 plus.
The second question, do I really have to provide #3x assets set? iPhone 6 uses #2x assets set, iPhone 6 plus in case of the absence of #3x images upscales #2x images in a very smooth way so that I cannot determine any pixellation.
I'm interested, in particular, whether Apple will reject the app, or maybe not add some kind of "Optimized for iPhone 6 Plus" badge to the app, or any other penalties?
Using a launch file only works for iOS 8+, so if you're targeting iOS 7+, you'll still need static launch images to support iOS 7 anyway.
Other than a few required launch images and icons, providing higher resolution images (e.g. #2x) within your app has always been optional.
Use the scale modes on image views to automatically scale the images to fit.
You'll need to provide static launch images or a launch file for the new iPhone 6 screens or your app won't get the "Optimized for iPhone 6" text on your app page in the App Store.
I have a couple applications built pre-auto-layout (but w/ Springs and Struts to support iPhone 5+) that I'm trying out in the iPhone 6 and 6 Plus simulator and they actually look quite good. However, I can't tell if the Springs and Struts are actually doing their job so-to-speak or if they're just being scaled. There must be some obvious thing I'm missing where it says which? Also, do auto-layout apps just automatically convert when recompiled with the latest SDK for iPhone 6 so they're not just scaling as long as 3X artwork is provided (in the case of 6 Plus)?
You can easily see, if your app runs in scaled mode by outputting the bounds and the native bounds screen of the main screen:
println("bounds = \(UIScreen.mainScreen().bounds)")
println("nativeBounds = \(UIScreen.mainScreen().nativeBounds)")
Without a designated launch images the output of the iPhone 6 Plus Simulator is:
bounds = (0.0,0.0,320.0,480.0)
nativeBounds = (0.0,0.0,960.0,1440.0)
The native bounds are 3 times the scaled bounds. This is the reason behind the #3x display.scale.
In case of the iPhone 6 Plus nativeScale also helps:
println("main screen native scale = \(UIScreen.mainScreen().nativeScale)")
println("main screen scale = \(UIScreen.mainScreen().scale)")
nativeScale will always be 3.0. scale will be 2.0 if the simulator does scaling.
To get a comprehensive understanding of the new resolutions see this great blog entry: http://www.paintcodeapp.com/news/iphone-6-screens-demystified
Use a different launch image for iPhone 6, iPhone 6 Plus and all the rest.
If you see a specific lunch image you know your app is not scaled and that it is running in the device's native resolution.
The only way I was able to tell was to go home and see if the status bar text was smaller than it was in my app. A smaller home screen status bar implies it is being scaled. If the status bar text is the same size within your app in the iPhone 6 sim as it is on the home screen of the simulator, then it is using your springs/struts or autolayout instead of scaling