I'm setting a simple image with some constraints on width and height and be centered in parent view in LaunchScreen.Storyboard and its showing it properly and the right position but when I run the Project seem like the image is Squeezed , any Idea on what may cause the problem ?
Asked
Active
Viewed 80 times
-2

Ashley Mills
- 50,474
- 16
- 129
- 160

Mahan
- 147
- 1
- 3
- 14
-
image view's image should be: aspect fit – Rahul_Chandnani Nov 20 '17 at 12:01
3 Answers
0
Set the content mode of the UIImageView inside the Attribute Inspector to "Aspect Fit" or "Aspect Fill"

Bruno
- 212
- 1
- 8
0
If this image is small then you should place it in center and add constraints:-
1:- center Horizontal 2:- center vertical 3:- make its height width aspect ratio or fix 4:- do not attach its left, right, top, bottom constraints

Sandip Gill
- 1,060
- 1
- 11
- 22
-
Read my question, i have already added these not hardcoding right , left ... however this is related to posotion( which is correct here ) and not the imagebeing squeezed – Mahan Nov 20 '17 at 14:04
0
this would happen when the personal hotspot is on ( or other such things that add height to status bar ) and the status bar become 20px more longer , fixing that will fix this issue.

Mahan
- 147
- 1
- 3
- 14