I am working on an app that targets only iOS 6 and I use nib files for the UI (not a storyboard).
I have a view in a view controller which contains a UIImageView as a subview. I need that the size of the image is 320x320 on both Retina 3.5 and Retina 4 screens.
I began designing the view in IB with the size of the Retina 4 Full Screen. I've dropped the UIImageView on my view and set it's size to 320x320. Then I pinned the height of the image view to a constraint equal to 320. At this point in time the constraint changed to a user constraint (i.e. it is blue instead of purple).
The other constraints affecting the image view are:
- Trailing Space to: Superview is 0
- Leading Space to: Superview is 0
- Top Space to: Superview is 0
So there is no Bottom Space to: Superview constraint defined.
Now the problem appears if I switch the Size of the view (in the Simulated Metrics) to Retina 3.5 Full Screen.
When I do this, the Height constraint of the image view changes to purple and to 232.
I don't know how to fix this problem. I would like the height to stay at 320. I thought this would be influenced by the Bottom Space to: constraint, but given that there isn't any defined, why does the height of the image view change?
Thanks in advance!