AutoLayout to keep view sizes proportional

前端 未结 9 892
南笙
南笙 2020-12-04 23:53

I\'m trying to achieve the following:

  • I have 2 views in my xib that need to stay 20 pixels off the edge (both sides and top)
  • The 2 views that need to
9条回答
  •  旧时难觅i
    2020-12-05 00:04

    This can be resolved by adding one more dummy view(dummyView) with its constraints set to Fixed width, height and aligned to centerX of Superview.Then add left view and right view Horizontal spacing constraint to dummyView.

    enter image description here enter image description here

提交回复
热议问题