简体   繁体   English

iPhone:通过IB添加项目时,UIScrollView不滚动

[英]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 . 以上所有项目都是通过IBUIScrollView子视图。

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.

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