iOS: How to Align The Center of a View With The Bottom of Another View With AutoLayout

前端 未结 6 663
离开以前
离开以前 2021-02-02 15:52

I want to make the center of the head imageView with the bottom of the blue title imageView\'s keep alignment.

How can I do it by using Autolayout?

screen 4.0inc

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 16:29

    If you have 2 views (fixed one and float one) and your float has a fixed height, you can set vertical-space from float to fixed, with -height/2 value. example: if your button has height of 20, then set vertical-space to fixed-view with value -10

提交回复
热议问题