Storyboard and autolayout: how make a circular image

前端 未结 7 704
逝去的感伤
逝去的感伤 2021-01-01 02:27

in storyboard (xcode 6) i want a circular user image profile take from Facebook.

So i have make this interface in storyboard, using auto layout:

7条回答
  •  无人及你
    2021-01-01 02:39

    You have given leading constraint, trailing constraint and the width constraint. So the image will try to leave 130 pixels before and after the image which will increase the width of the image.

    So the solution is, remove either one of the leading or trailing constraint.
    

    The best workaround is, remove both the constraint and add a horizontal centre constraint, that is what you want.

提交回复
热议问题