简体   繁体   English

InterfaceBuilder,更改视图层次结构并保留约束

[英]InterfaceBuilder, changing view hierarchy and preserve constraints

I have 我有

viewcontroller - scrollview - child views

I want to change it to 我想将其更改为

viewcontroller - view - scrollview - child views
                    \
                     - fixed bottom button

There are many constraints created for (scrollview - child views). 为此创建了许多约束(滚动视图-子视图)。
What's the recommended way to change the hierarchy? 更改层次结构的推荐方法是什么?

I believe you have: 我相信你有:

您的版本

Just copy your scrollView to another viewController. 只需将您的scrollView复制到另一个viewController。 Then replace your scrollView with UIView and finally copy back scrollView as a subView. 然后用UIView替换您的scrollView,最后将scrollView作为子视图复制回去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM