Check that following constraints are added to your view:
- Go to Storyboard -> Select your view
- Now at right-bottom corner you can see small buttons to add constraints
- Select “Pin” button
- And mark all 4 constraints for all sides
- Add all 4 constraints to your view
EDIT
I have created one demo as you described.
ImageConstraint Demo
Set all constraints for UIScrollView
and UIImageView
and works perfectly.
Below are reference images for you.
Storyboard:
FOLLOW BELOW STEPS
Step – 1 : In storyboard Select UIView
-> Editor -> Resolve layout issues
Step – 2 : Repeat same to add constraint
Step – 3 : Select UIScrollView
and add constraint from right-bottom corner
Step – 4 : Select UIImageView
and add constraint for it.