Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我应该添加哪些约束来设置与 iOS Autolayout 中的 Superview(在我的情况下是 UIViewController 的视图)成比例的宽度和高度,通过 Autoresizing 我们可以像下图所示的那样做。
如果 uiviewcontroller 中有一个 uiview。
您必须在该 uiview 的容器约束中水平和垂直添加中心。
您需要使用您的超级视图为该 uiview 添加等高和等宽约束。