iPhone: UIScrollView not scrolling when adding item via IB

放肆的年华 提交于 2019-12-11 06:37:50

问题


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.

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


回答1:


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



来源:https://stackoverflow.com/questions/3608949/iphone-uiscrollview-not-scrolling-when-adding-item-via-ib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!