简体   繁体   English

ScrollView在iOS7中不起作用

[英]Scrollview not working in ios7

I have scrollview in my xib. 我的XIB中有scrollview。 I have added it as subview of view. 我已将其添加为视图的子视图。 And I have added 2 labels in scrollview one is at top part and anotherone is at bootom. 我在scrollview中添加了2个标签,其中一个位于顶部,另一个位于bootom。 I have set: 我已经设定:

scroller.contentSize=CGSizeMake(320, 1000);

And also set size of scrollview to 800 from xib. 并从xib将scrollview的大小设置为800。

But though scroll is not working. 但是,尽管滚动不起作用。 Am I missing something here? 我在这里想念什么吗?

Vivek if you cannot scroll the view even after setting contentSize properly then you have to uncheck "Use AutoLayout" . Vivek如果即使正确设置contentSize后也无法滚动视图,则必须取消选中“ Use AutoLayout” You can uncheck it from interface builder. 您可以从界面构建器中取消选中它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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