简体   繁体   English

ScrollView无法在IOS7上滚动

[英]ScrollView not scrolling on IOS7

I've a problem with the scrollview in IOS 7. at first, it didn't work at all not even on IOS 7 or IOS 8 but after I added this code: 我在IOS 7中遇到了滚动视图问题。首先,即使在IOS 7或IOS 8上,它也根本不起作用,但是在添加以下代码后:

it starts working on IOS 8 but still not working on IOS 7. 它开始在IOS 8上运行,但仍无法在IOS 7上运行。

[scroll addSubView:contentViewScroll];
scroll.contentSize = contentViewScroll.frame.size;

can any one suggest a solution?? 有人可以提出解决方案吗?

您的contentSize必须大于框架大小,以便滚动视图可滚动。

I've fixed the problem... 我已经解决了这个问题...

as everybody says, my content size was bigger than the scrollview frame size, but the scroll was not working. 就像每个人都说的那样,我的内容大小大于滚动视图框架的大小,但是滚动无法正常工作。 after spending hours in this issue, I've managed to fix it by fix all the warning on the controllerview. 在这个问题上花了几个小时之后,我设法通过修复controllerview上的所有警告来修复它。 after all the warnings are fixed the scroll starts to work. 修复所有警告后,滚动开始工作。

maybe this sounds stupid, but fixing the warnings got the scroll working at last 也许这听起来很愚蠢,但是修正警告使滚动条终于起作用了

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

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