iPhone:通过IB添加项目时,UIScrollView不滚动 [英] iPhone: UIScrollView not scrolling when adding item via IB

查看:44
本文介绍了iPhone:通过IB添加项目时,UIScrollView不滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过IB创建一个非常简单的滚动页面.我得到的是顶部是 UIImageView ,底部是2个 UIImageViews ,中间是 UITextView .我已禁用了 UITextView 中的滚动,因为我不会整个页面上下滚动,包括 UIImageViews .

I'm trying to make a very simple scrolling page via IB. What I've got is a UIImageView at the top and 2 UIImageViews at the bottom, with a UITextView in the middle. I've disabled the scrolling in the UITextView as I won't the whole page to scroll up and down including the UIImageViews.

谁能告诉我为什么 UIScrollView 不能上下滚动?上面的所有项目都是 UIScrollView 通过 IB 的子视图.

Can anyone tell me why the UIScrollView won't scroll up and down? All of the items above are subviews of UIScrollView via IB.

推荐答案

如果 contentSize 大于框架,则只能在 UIScrollView 中滚动.你设置好了吗?

You can only scroll in a UIScrollView if the contentSize is larger than the frame. Have you set this?

这篇关于iPhone:通过IB添加项目时,UIScrollView不滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆