简体   繁体   中英

ScrollView.contentSize doesn't work on IOS 7

My project is using ScrollView.contentSize .

When I run it on Simulator (iOS 8) it works fine.

But ScrollView.contentSize = CGSize() isn't working on iOS 7 on my own IPHONE 4.

It can be scrolled normally on IOS 8 (Simulator) but can't be scrolled on my IOS 7 (IPHONE 4).

This is my code:

self.scrollViewCovor.contentSize = CGSize(width: self.scrollViewCovor.frame.width, height: 596 + 281 + 80)

Anyone knows how to fix this?

Thanks!

UIScrollView scrolls on all the simulators but not on my iPhone

you just need to resize the scrollview's frame size in viewDidLayoutSubviews

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