iOS7 has really been jerking me around.
This is a project imported from iOS6 that ran smoothly on all devices I tested on. Somehow the image view pictured gets set to something like 312x400 at runtime, ignoring the specification for height that I set in the storyboard.
I'm aware I'm missing some detail about autolayout but what gives? Why does the height I provided not matter at all, and why is this any different from Xcode4.x/ios6?
The layout for the image view height property is ambiguous. When you use autolayout, it doesn't use the height of the image view in Interface Builder. Instead it uses the constraints set on the image view.
Create a height constraint on the image view and set it to what you want the height to be (in the case of a fixed height). If you want the height to scale, create constraints for the top and bottom of the image view to the image view's super view. For the screenshot you provided, you may want to set a constraint from the top of the image view to the top layout guide.
set intrinsic size as Placeholder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With