Working with Top Layout Guide in UIScrollView through Auto Layout

后端 未结 3 1329
闹比i
闹比i 2021-02-06 08:50

I want to use the Top Layout Guide in the UIScrollView through Auto Layout. Without the UIScrollView Auto Layout works well with Top

3条回答
  •  有刺的猬
    2021-02-06 09:28

    While adding spacing constraints, Xcode does not show items which have negative distance with your view. It seems you added a vertical space constraint between UIScrollView and UIView. Delete that constraint, move your scroll view to below Top Layout Guide and add a new vertical space constraint between UIScrollView and Top Layout Guide.

提交回复
热议问题