I am using autolayout. I have a UIImageView in IB. I want to make the its width equal to its height.
I learned how to do most of this stuff in Xcode 4. I know how to do it programically, but that produces and error that Apple hasn't fixed yet:
'Auto Layout still required after executing -layoutSubviews. UITableViewCell's implementation of -layoutSubviews needs to call super.'
So how do I set the this constraint in Xcode 5 Interface Builder?
As Timothy Moose commented, you have the option to keep aspect ratio in Xcode 5.1.
Make sure you have width and height the same. Add the aspect ratio constraint by using control drag to itself.
It will automatically ensure both height and width are maintained.
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