Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
InterfaceBuilder中带有自动布局的UIScrollView_Uiscrollview_Interface Builder_Autolayout - Fatal编程技术网

InterfaceBuilder中带有自动布局的UIScrollView

InterfaceBuilder中带有自动布局的UIScrollView,uiscrollview,interface-builder,autolayout,Uiscrollview,Interface Builder,Autolayout,我正在尝试使用带有自动布局的UIScrollView。我根本无法让它像支柱和弹簧那样工作。我想使用autolayout,因为这是未来的发展方向,但令人沮丧的是,苹果只是放了一个很小的文档,甚至没有详细解释这一点。 我想声明的是,我正在使用IB,而不是在代码中创建我的视图,这在现在是不可能的 这是我的视图层次结构: -UIViewController -UIView (the base view) -UIScrollView [Contraints: topEdge-S

我正在尝试使用带有自动布局的UIScrollView。我根本无法让它像支柱和弹簧那样工作。我想使用autolayout,因为这是未来的发展方向,但令人沮丧的是,苹果只是放了一个很小的文档,甚至没有详细解释这一点。 我想声明的是,我正在使用IB,而不是在代码中创建我的视图,这在现在是不可能的

这是我的视图层次结构:

-UIViewController

    -UIView (the base view)

        -UIScrollView [Contraints: topEdge-SuperView-0, leftEdge-SuperView-0, bottomEdge-SuperView (bottom layout guide sometimes)-0, rightEdge-SuperView-0, and sometimes CenterX-Superview-0]

            -UIView (the content View) [topEdge-SuperView-0, leftEdge-SuperView-0, bottomEdge-SuperView-0, rightEdge-SuperView-0, and also tried CenterX and centerY seperately]

                -The Actual Content [Constrained to the super view]
我认为这就是苹果所谓的纯自动布局设置,根据他们的文档,它使用UIScrollView和Autolayout。请不要让我看那个文件,我已经读了好几遍了。现在我也继续做这个

translatesAutoresizingMaskIntoConstraints = NO 
但结果是一样的,不管上述选项是真是假

结果是:没有任何东西滚动

有什么方法可以消除这种疯狂吗?我试着复制rmayoff在Youtube上的视频中所做的,请不要让我参考,但不。。。没什么