iOS Interface Oversized in Xcode Application - ios

I have recently been running into a problem with one of the iOS applications that I'm developing. The problem with this application is that UI elements appear to be oversized. In Xcode the elements could have the same default sizes, but during the simulation process the elements are almost too large to fit on the screen. Has anyone ran into a similar issue and figured out how to resolve it. I have attached pictures below that illustrate the problem more clearly. In one of the pictures below, the keyboard clearly appears to be larger than that in the other picture.
Oversized User Interface
Normal Sized User Interface

Two possibilities
The device has Display Zoom turned on. You can change that in Settings > Display & Brightness > Display Zoom.
You app doesn't have a launch image for that size. Either add a launch image for that screen size or use a launch storyboard/xib. How to enable native resolution for apps on iPhone 6 and 6 Plus?

Related

Screens of an iPhone App have a fixed aspect ratio

I am adapting an iPad app (originally built on Objective C/Swift) for the iPhone.
I have removed all things from the UI, the only things left are:
Blue fill - the navigation bar
Red fill - the toolbar
The app appears to have the screen's aspect ratio somehow hard coded for the iPad. I am unable to make the app occupy the full screen using both the interface builder and directly editing the code of the UIViewController.
Doesn't work on iPhone X 11.4 and iPhone 5 9.3, works only on the iPad family.
The issue seems to be outside of the UIViewController or even the UINavigationController.
What project setting may be causing this issue?
iPhone is allowed in Xcode, Targeted Device Family is resolved as 1, 2 for the whole project
Requires full screen is checked for iPhone
The app on various iPhones:
Interface builder - all seems fine there:
Please check for launch images. You need to provide the all sizes of the launch image which are not provided.
You can also add missing sizes from the utilities bar.

iOS keyboard appears too large. Is this an issue with launch images? [duplicate]

This question already has an answer here:
The keyboard in my iOS app is too tall on the iPhone 6. How can I adjust the resolution of the keyboard in XCode?
(1 answer)
Closed 5 years ago.
In our iOS apps, I have seen that if we leave out certain launch images sizes, that the screen appears as if it is scaled up from a lower resolution device.
When this happens, the devices also display a taller keyboard with chunkier looking text.
When built in on my iPhone 6s+, from Xcode 7.x the keyboard in our app is 1 & 7/8ths" of an inch tall.
Looking at Skype, Slack, Waze, Messages, on the same device the keyboard is 1 & 3/8ths" tall.
I'm using whatever the standard keyboard is when our app's text fields are tapped on.
I have seen that this can be caused by missing launch images at the target device's size, but I'm not sold that this is the only cause. Does anyone have any insight why an app would appear at a lower resolution than what is native to the device?
Is there a known issue related to launchImages or some other factor that might be causing this?
In some of my testing, at one point I got the app to launch as expected at the correct size after switching full size retina launch images. This may have been fixed by building under Xcode 8.x, but I'm not sure and we can't do that yet because of other limitations.
Thanks much.
It's related to Launch Images in assets because when iPhone 5 came out first, XCode had this functionality to add certain launch image sizes to zoom in the UI of smaller screens and make it compatible to iPhone 5's screen. This was called Branding when I worked on it to make app compatible to bigger screen in a short time.
But it isn't the preferred way and you should avoid using Launch Images, use Launch.xib instead to create your Launch Screen. You can also use Launch.storyboard, whatever you prefer. It won't zoom in the Keyboard or other UI aspects then.
Hope it helps!

When using constraints, why won't this interface stay the same across the multiple devices available in the storyboard area?

After trying to create pins to the edges, tops, and bottoms of these buttons, the UI still becomes either stretched or not wide enough when selecting the different devices available from the storyboard in Xcode 8. What can I be doing wrong or how do I correct this issue because Apple won't accept this app due to it not showing in iPhone resolution on the iPad even though this app is set to run on iPhone devices.
Here is an image showing the current constraints:
Here is the demo project where you can find the correct constraints as per your requirement.
http://wikisend.com/download/172838/DemoAutolayout.zip

Black bars simulating iPhone 5 - Xcode

When running the iPhone 5 simulator 2 black bars appear making it the resolution of the iPhone 4(s). My question is: how am I able to use the full screen resolution? (it also creates black bars all around the app when trying to simulate an iPad)
Now, I know this questions has been answered multiple times here on stackoverflow, but all of them give the solution of adding a Default-568h#2x.png launch image. I want to make use of the LaunchScreen.xib instead of creating all the seperate launch screen images.
Anyone got a solution for this?
Thanks!
- Merijn
You must use a specific launch image to take into account the 4" inches screens...
or either way you can use a specific Launch screen with autolayout constraint for example if you don't want to add too many launch images : http://useyourloaf.com/blog/2014/12/24/using-a-launch-screen-storyboard.html

iPhone 6 - app does not fill screen

Most of my apps scale up when run on an iPhone 6, but for some reason one of my apps looks like this:
What would cause it to not just scale up and fill the screen?
EDIT: Here are some repro steps:
Create a new project (Single View). Turn off size classes and just use iPhone.
Make the background orange.
Add a yellow UIView subview at (20,20,280,200).
In Xcode you get this:
Now simulate on iPhone 6. You get this:
Why doesn't it just scale up and look normal?
Not sure why this is getting downvoted. It's a legitimate question. And here's the legitimate answer:
Remove the "Launch Screen File" in Projects > General. Xcode 5 did not have this so older apps scale up automatically. Apps created with Xcode 6 get a default Launch Screen file created.
Removing it will make your app scale up on iPhone 6.
I have got the same problem and I managed to solve it by adding constraints to my ViewController in the storyboard.
Make sure that you clicked the ViewController of your scene. They yellow button in the this screenshot.
Click Editor-> Resolve Auto Layout issues -> Add Missing Constraints
Now you will find that the background image is scaled up to fill iPhone 6 or iPhone 6 plus.
Note that this solution works for me even if I did not provide any launch screen file.
I had the same issue. Searching for an answer, most of them mention the launch image. To me, what did the trick, was that I first enabled launch image for iOS8.0 and later in Xcode, which requires the native resolution sizes for 4.7" and 5.5". Adding these sizes didn't help, but when I re-disabled them, it started working!
If you do have any launch image, you will need launch images for all appropriate sizes. I was doing a minor update to an app, and it was not showing correctly on the iPhone 6 simulator. I created four launch images (.png files). Since the app should still run on iOS 7, I apparently could not use an asset catalog. I gave the images the correct names, and all is good.
Image sizes and names may be found here:
Sizes and Naming of Launch Image for iPhone app in iOS8

Resources