Middle View Is Squeezed On 3.5 Inch Screen - ios

I"m encountering a constraint issue where the middle UIView in between two UIViews, one at the top and one at the bottom, is getting squeezed on a 3.5 inch iPhone screen (iPhone 4S). I'm not sure what's wrong with my constraints but here is what it looks like on iPhone 4S...
Here's what it's supposed to look like (iPhone 6)...
And finally here are the constraints...
Tell me if anymore information is needed. Thanks!

Related

Xcode 'Deletes' Image View Inside Table View Based On Device Screen Size

I'm creating a simple app that includes a table view using Swift 5 and Xcode 11. Inside the table view(which, by the way, is fixed into landscape), there is a button on the right of the tableview cells and an image view with fixed constraints, size, and width on the left. Everything has been working out pretty well for my app, until I noticed that the image view would kind of 'disappear' if I changed the device to, for example, iPhone 5s, 4s, or even iPhone Pro(I'm testing with iPhone 11 Pro Max).
This is when the device is iPhone 11 Pro Max:
11 Pro Max
This is when the device is iPhone 11 Pro: 11 Pro
And here are my constraints for my image view: Constraints
Any help is appreciated
P.S. Ignore the image view that says 'img'
After seeing both of the screen shots and the constraints I see what is the issue here.
It's the way you have applied the trailing constraint for the image which in your case is 663 (Should not be fixed). What you can try is Give width constraint to the image view and then change the trailing constraint something like below
This should help you.
Also what you have to take care of moving forward is the constraints you choose to apply coz that is the most important thing while desigining Responsive UI
Happy Coding.
right Constraint should be negative,for example,
img.snp.right = view.right - 20

iOS: Auto-layout constraints acting strange when designing TableView for iPad

I am trying to have simple custom table view cells with UIImageView and another View with three Labels in it.
I set the constrains to 5 from UIImageView and 0 from all remaining sizes. But as soon as I select bigger iPad in the Xcode designer (like iPad Pro or Pro with 12,9" screen) I suddenly get space on the right side even though the constraints still says "0" when clicked.
The screenshot below should help illustrate the issue (first is regular iPad, then iPad Pro 10.5" and finally iPad Pro 12,9"):
I already did some auto-layout work for iPhone and never encountered something like this.

Layout missed up on 3.5" Screen iPhone 4

I have developed my App on XCODE 8 which by default removes iPhone 4 emulator and I didn't notice that until I finished my app, and I used Auto layout to make the UI fits all iPhone screens and that what happened (the layout was good on iPhone 7,6,5) the problem is when I additionally installed iPhone 4 emulator I found that the layout is totally missed up and unreadable/usable.
So what options do I have to solve this and make it fit the iPhone 4 screen too with Auto-Layout with missing up the other sizes ?
Here is screen shot of my Login screen on iPhone 6 (4.7") vs iPhone 4 (3.5")
You must always give constraints with respect to other alternative buttons or a view, it should not be hard coded. Try making views programatically, it will be more easy and helpful to you.
It seems like your constraint is set to have a fixed distance related to the top of your screen. So when the screen height get smaller, your views are pushed out of the screen. So to better adjust views position, you can have your views to be related to vertical center. Say your login box is in both horizontal and vertical center, not metter you are using iphone 6 or 4, you should always see your login box.

Why iphone 4 & ipad width look similar?

I have added a view in my app. I want the view to look equal on all the devices. So I have applied below constraints. The width of iPhone 4 & iPad looks similar so I want to know it is happening. Below are my constraints.
In case of iPhone 5,6,6+ the width is looks similar
Constraints are as follows

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