I have an UIImageView in my app and it resizes perfectly according to the constraints that I set to it. But when I load an image into the UIImageView, it messes up everything. What could be causing the problem?
Here are some screenshots attached:
(The blue square is the ImageView)
As you can see, there is a UITextView above the UIImageView which should be visible like here:
But, when an image is loaded into the UIImageView, it stretches into a square for some weird reason, hiding the UITextView above it..
EDIT:
My constraints attached to the UIImageView
use this
imageView.contentMode = UIViewContentModeScaleToFill;