开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜