bigpotato
bigpotato

Reputation: 27507

Xcode Storyboard: Button image gets stretched with autolayout

I have an issue where my storyboard subviews aren't sizing properly in the simulator. For some reason,

1) the image for the settings button (on the top right, marked with the arrow) is getting stretched 2) the text in my black label is getting cut off

Simulator:

enter image description here

Storyboard:

enter image description here

I'm using autolayout. Perhaps I'm missing a constraint? but it looks like everything is snapped to the blue lines. What's going on??

Upvotes: 0

Views: 1203

Answers (1)

matt
matt

Reputation: 535168

The problem here is that you have set the width constraint of your image view absolutely. That's fine, but you didn't (as far as I can tell) also set its height constraint, so it adopts the height of the original image, which is much taller.

Upvotes: 1

Related Questions