[英]iPhone: UIScrollView not scrolling when adding item via IB
I'm trying to make a very simple scrolling page via IB. 我正在尝试通过IB创建一个非常简单的滚动页面。 What I've got is a UIImageView
at the top and 2 UIImageViews
at the bottom, with a UITextView
in the middle. 我所得到的是一个UIImageView
顶部和2个UIImageViews
底部,有一个UITextView
中间。 I've disabled the scrolling in the UITextView
as I won't the whole page to scroll up and down including the UIImageViews
. 我已禁用UITextView
的滚动,因为我不会整个页面(包括UIImageViews
上下滚动。
Can anyone tell me why the UIScrollView
won't scroll up and down? 谁能告诉我为什么UIScrollView
无法上下滚动? All of the items above are subviews of UIScrollView
via IB
. 以上所有项目都是通过IB
的UIScrollView
子视图。
You can only scroll in a UIScrollView
if the contentSize
is larger than the frame. 如果contentSize
大于框架,则只能在UIScrollView
滚动。 Have you set this? 你设置好了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.