开发者

is it possible to know and access the content offset of a scrollView during zooming mode

开发者 https://www.devze.com 2023-02-10 09:15 出处:网络
开发者_如何学编程I have a image on scrollView which can be zoomed and paned. We know that the content offset ofa scrollView keeps changing while panning. Is it possible to access the contentSize dynam

开发者_如何学编程I have a image on scrollView which can be zoomed and paned. We know that the content offset of a scrollView keeps changing while panning. Is it possible to access the contentSize dynamically during panning stage??? Thank you..


If you set yourself as the delegate of the scroll view and implement this method:

- (void)scrollViewDidScroll:(UIScrollView *)scrollView

It will send messages during the panning of the scroll view. Each time this is called, you can access the scroll view and access the contentSize.

I can't say for sure, but it may be the case that the contentSize is affected by the scale applied by zooming in the scroll view. Keep this in mind if you need to do any calculations in your project.

Hope this helps!

0

精彩评论

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