Can the viewing area be judged by UIScrollView?
Can the viewing area be judged by UIScrollView
?
There's many ImageView
in my开发者_StackOverflow UIScrollVer
, I only hope that in the visible region for loading images UIImageView
.
How can I do?
thanks for any helps!
Just use your image size for the UIImage that holds the image and set that as your content size.
UIImage *myImage = [UIImage imageNamed:@"myImage.png"];
self.scrollView.contentSize = myImage.size;
Hope this helps.
The contentOffset
property of UIScrollView
shows the current viewing area.
精彩评论