简体   繁体   中英

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:

it starts working on IOS 8 but still not working on 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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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