Autolayout iPhone 6 doesn't work - ios

I developed an app for iOS, this app should work for iPhone 4s, iPhone 5, iPhone 5c, iPhone 5s, iPhone 6 and iPhone 6+. I read the apple documentations and I found that I've to design only a Storyboard in which I use auto layout and size class.
I designed the user interface with Storyboard and I set all constraints, but when I run it on my iPhone 6 it shows me the user interface not optimized for the display of my iPhone 6. Here's a sample:
As you can see it shows me the view with big operator log, big clock, big battery indicator and big keyboard.
Why it doesn't work?
Should I add the splash screen for Retina 4.7 and Retina 5.5?

You need to add a "launch screen file" which is a XIB or Storyboard showing the screen that is shown while launching.

Related

Why aren't these constraints working properly on iPad 9.7" and 12.9"?

I have the following view...
The problem I have is displaying this view on iPad 12.9" and iPad 9.7" the constraints I have setup don't seem to work at all. here are the contraints
But when displayed on iPad 9.7" this is what it looks like...
Where am I going wrong? What should the constraints be so that this simple view can be laid out properly on iPhone6s, iPhone7 plus, iPad 9/7" and iPad 12.7"?? I don't even care if the iPad views are perfect, just so long as all the buttons are visible so that I can get Apple to stop rejecting my app for not supporting iPad.
You have not set Universal (iPhone + iPad) type as the supported application devices. That is why it displays iPhone screen with scaling factor 1x,2x on iPad.

Xcode 8.1 Choose an initial device view showing only iPhone 7 and 7s

In Xcode 8.1, I am unable to choose iPhone 6/6s Plus. Only iPhone 7/7s are present. Please help why 6/6s is not given in the drop down list.
iPhone 7/7s have the same display size as iPone 6/6S. So either of them will work the same. The aim is to provide all possible screen size and as few are redundant so they are not included in the list.
Think of it less as choosing an "initial device view" and more of an "initial screen size view". In this respect the iPhone 6, 6s and 7 have the same screen size, as do the 6+, 6s+ and 7+. With this in mind it would be pointless to show the 6s/6s+ in the drop down as selecting it would ultimately be the same as selecting the 7/7+.
So not a bug, intended (and logical) functionality.
That is just for the frame of your storyboard, as the frame for iPhone 6, iPhone 6s and iPhone 7 are all similar, in the same way frame for iPhone 6 +, iPhone 6s + and iPhone 7 + are similar so initially they are giving you option to chose initial layout.
After selecting an initial device, all the views in your storyboard will converted to that frame.
Now when you run your app then you are able to see all the simulators from there.
If you want to select iphone 6s as a initial device you can choose device from bottom on your storyboard.please find image -
If you want devices list in your simulator you can add more devices from add new device

Launch screen storyboard for multiple devices and different orientations in iOS

My application supports all devices from 4 inch onwards in both orientations.
iPhone - 5, 5S, 5C, 6, 6S, 6+, 6S+, SE
iPad 4, iPad Air, iPad Air2, iPad Pro etc
Using asset catalog for launch screen its working fine but in iPad Pro app displays standard keyboard rather iPad Pro optimized keyboard which is bigger and doesn't give best user feel.
As per below link app should be using launch storyboard rather than asset images to get optimized iPad Pro native keyboard.
https://forums.developer.apple.com/thread/26357
Now question is how to support both orientations during launch screen storyboard ?
How to add different launch images for portrait and landscape modes in storyboard ? Using size class for iPad in both orientations its both Regular and Regular size.
Note - Because it launches a screen storyboard, one can't customize the size class with custom class.
In your launchsScreen.storyboard add imageView and set it's four constraints like : top,bottom,leading,trailing.
Now, in your assets add separate images for iPhone and iPad with 1x,2x,3x resolution for iPhone and 1x,2x for iPad.
And set that image to that imageview. It will manage then for every device!
You can set different images for different size class in assets. So for different orientation you can set different images in assets.
refer Apple documentation for more details.
And yes you can use vector graphics as suggested in comment by #pkc456 to keep your app light weight.

How to Support All iPhone Screen Sizes

I have an app in Xcode 6.2 with the storyboard supporting all devices. For some reason, whenever I load the application on the iPhone 6+, or iPhone 4s, or iPad, the screen doesn't take the size of the iPhone/iPad. However, on an iPhone 6, 5s, and 5, the screen takes the full size of the iPhone. Why is this? I am very unfamiliar with sizes and how to properly support all sizes. Right now, I have set the screen sizes in the storyboard for each view controller to 320 x 568. The width is "Compact" and the height is "Any".
If this has anything to do with this, my iPad screen comes out blank. It's just white. Apple recently rejected my external testers app submission due to this.
I have done lots of research on these 2 questions, but I had a hard time understanding anything, as I am new to iOS Development.
To properly handle varying sizes and how that affects your layout you will want to use auto layout. Check out this great tutorial from ray wenderlich to get you started. Once you get started feel free to post more specific questions about any roadblocks you run into. Good luck!
http://www.raywenderlich.com/64392/video-tutorial-beginning-auto-layout
When you want your app to work on any device, ideally you should keep the width and height both set to "Any". You should switch to "Compact" or "Regular" width or height only if you have any requirement specific to a particular device. To understand things in detail read more on Size classes. It is very nicely documented in this Apple developer site.
iphone:
iphone 4- 320x480
iphone 5- 320x568
iphone 6- 375x667
iphone 6plus - 414x736
and also ipad:
ipad mini - 768x1024
ipad air - 768x1024
ipad pro 10.5 - 834x1112
ipad pro 12.9 - 1024x1336

Change position of image for 3.5 and 4 inch screens

I have an iPhone app that I'm optimising for the iPhone 5's 4-inch screen. I also want it to work with iOS 6. I turned off autolayout to get it to work with iOS 6. I want everything in the view to stay the same distance from the bottom of the screen for both screen sizes. How do i do this?

Resources