Horizontal center constraint issue in ios?

后端 未结 3 1739
借酒劲吻你
借酒劲吻你 2021-01-27 13:31

\"enterI am having hard time in learning constraints & auto-layout in iOS.I have used any-widt

3条回答
  •  离开以前
    2021-01-27 14:04

    maybe post a picture of what your layouts look like in the story board so we can understand your problem better, but also as a rule of thumb, make sure you have constraints that will satisfy an x and y position, and a width and height, if all those are satisfied your layout wont be ambiguous. from what you have said, it sounds like you only satisfy 3 of those criteria, leaving y position out (maybe add center vertically or top space).

    it may be asking you to reduce the width and height of your constraints because the value of the constraints is less than what they are in the visual representation on the storyboard, just click on the constraints and see what their value is.

提交回复
热议问题