Why is the image being stretched and compressed when the missing constraints are being added?

I add the missing constraints, but the image is being stretched and compressed. How do I fix it so the image will be have the same size?


Use content mode

contentMode = UIViewContentModeScaleAspectFit

adding a constraint by xcode it would be change according to view so give your constraint for top and bottom

for swift Somewhat confusingly, Swift drops the prefix for ObjC enum values:

imageView.contentMode = .ScaleAspectFill

Need Your Help

C++ Really basic drawing/GUI

c++ user-interface drawing

I'm searching for some examples on drawing basic shapes on the screen using only the Win32 API in C++

start-domain failed Glassfish on Windows 7

windows java-ee glassfish

I wanted to start a Glassfish 4.1.1-Server on Windows 7 with JAVA 8 JDK 66, but my command asadmin start-domain failed.