Adding a Launch Screen changes the display of my whole app - ios

I tried adding a launch screen to my app. I tried the simplest : just add a new file of type Launch screen to my project (and do nothing more). But this seems to change the resolution of my whole application. Here are sample screens of the same controller of my application with and without the Launch Screen :
without the launch screen :
with the launch screen :
Strangely, once I have used the Launch Screen once, I need to quit and re-launch the simulator to re-obtain the original resolution.
What should I do and which resolution is the correct one to work with ? Does it have something to do with retina ?
I can copy-paste the code generated in the LaunchScreen.xib if needed.

From Apple's documentation:
You use a launch XIB or storyboard file to indicate that your app runs
on iPhone 6 Plus or iPhone 6.
By adding a launch screen you activated native support for iPhone 6 and iPhone 6 Plus. That means that your app is no longer scaled up to adapt the larger screens of the iPhone 6 and 6 Plus, but uses the full resolution of those larger screens (which IMHO is a good thing that you should do).

Related

Removing launch screen file from Info.plist scales the views

I noticed something that when you remove the launch screen file entry from the XCode Info.plist file, any view of any view controller becomes scaled according to the screen size, so the views appear zoomed in on large screen sizes such as the iPad Pro (12.9 inches) and appear somehow zoomed out on smaller devices (iPad Pro 9.7 inches).
In that case it seems that the Auto Layout constraints have no effect as the scaling is done automatically.
I really can't understand what does this has to do with the layout constraints, so I appreciate if any one can explain what's the reason for that.
Without being able to provide deep details, iOS uses the launch screen definition (view or static images) to determine which size classes the app should use. If you have not supplied those, it seems you get scaling that you generally do not want.
That doesn't mean auto-layout no longer has any affect... it just means that the auto-layout engine is not using the current screen size for its size/positioning calculations.
You'll see very similar results if you explicitly set your project for iPhone only.
Simple, obvious solution: Don't remove the launch screen.
Yes this is expected behaviour... Same is for iPhone 6 Plus. If you remove the iPhone 6 Plus launch screen, it will display the iPhone 6 scaled version.
This is just for backward compatibility. If your app is not ready for iPad Pro or iPhone 6+, scaled version can be used by removing the respective splashing screens.
All current iPhone apps or iPad apps in AppStore those are not optimised runs as a scaled version.

Swift - Issue with using webviews when launch screen images are used instead of launch screen file

I'm working on a iOS project and this one issue is bugging me for days. I have a simple webview wrapper in my application and the issue that I'm having is that if I use launch screen images and not the launch screen file the webview content gets badly scaled. I cannot relate why the launch screen images should have any impact on the webview that is being presented later. My goal IS to use the launch screen images.
This is mostly noticeable on iPhone 6 and iPhone 6 plus.
Example with launch screen images:
Example with launch screen storyboard:
Any advice is appreciated. Thank you.
This issue is because of the missing launch image for iPhone 6 and iPhone 6 plus. Make sure that you have added all the launch screen images.

iOS View Controller size is 4 inch on iPhone 6

I have iPhone oriented application, the UI created using a storyboard, when I run it on 4.7 or 5.5 inch devices it presented as 4 inch screen with black empty space on top and bottom of window.
The project was created on Xcode 6 and I got the issue when I compile it with Xcode 7 but I'm not sure if it's related.
On Xcode 7 you must add the launch screens (on "images.xcassets") of your desired resolution (iphone6 , iphone5...) or instead you can add the splash screen that automatically will work for all resolutions (YourProjectName/General/App Icons and Launch Images).
Hope this helps.
You haven't add added Launch Images with proper resolution in proper place. So your app is considering it only for iphone5 not above so.Place launch Images properly.It will help.Thanks
Here are Apple's answers:
If you don't use launch images, but you do have a Launch Screen (nib
or storyboard) then we synthesize your launch screen at install time.
If you don't have any launch images, and you don't have a launch nib
or storyboard, then you are declaring that you don't support any
screen sizes aside from 320x480
A brand new project should not demonstrate any of these issues
With the iPad Pro you will need a Launch Screen to support the new
screen size (and you need Launch Screens to support multitasking on
iPad in general).

Storyboard size on iPhone6 after update

I take a old app with a 3 storyboard inside:
iPhone4 || iPhone5 || iPad
at the moment from the AppStore this working well on iPhone6 and 6Plus even if not have iPhone6.storyboard inside show in full screen correct position, but now during the test on iPhone6 (device not simulator) is showing a 4.0 inches inside a big display of 4.7 inches, here the screen:
I Know is better using a new system with Auto Resize and Size Classes but at the moment we don't have time to do a refactor.
So this is my question, is possibile reuse my iPhone5.storyboard as before to see all stuff inside in a correct position, neve use Auto Layout and Size Classes?
It may be possible, by not using a launch image .xib file. In that case, your app appears zoomed on the iPhone 6. That is why your existing app looks okay on iPhone 6: it doesn't have a launch image .xib file. So you could solve the issue by deleting the launch image .xib file and telling the app to use old-fashioned launch images instead.
But that, as you rightly say, is not really correct behavior; eventually, Apple will probably forbid it.

Is it mandatory to use Launch Screen File to support iPhone 6/6Plus?

I have only Default-568h#2x.png and Default-568h#3x.png in my bundle. When I execute the application in iPhone 6 and 6 Plus the app automatically does some scaling and displays the app utilising full screen size.
But when i use some .xib file as "Launch Screen File", the app stops scaling and does not displays for full screen, has various UI issues.
Is it mandatory to have launch file, if I need to support iOS 8 / iPhone 6 / iPhone Plus?
Is there any chance for the app to get rejected if the app does not use LAUNCH FILE?
Please let me know your comments.
You can use your storyboard for your launch screen now.
http://oleb.net/blog/2014/08/replacing-launch-images-with-storyboards/
NO.
LaunchScreen xib is a quick way to detect main screen.
Depending upon the main screen, OS runs your app and determines screen width and height.
Another approach is just to add launch images for iPhone 6 and 6 Plus instead of LaunchScreen file.
NOTE: Apple is motivating to use LaunchScreen, because it is a one file launch image. It can also be used for pads as well. Single file multi purpose.

Resources