Get the current UIScrollView scroll values on the

2019-02-07 21:37发布

问题:

If I have a UIScrollView and move it around to a specific location, is there any way to get that position it has moved too?

回答1:

Check UIScrollView's contentOffset property:

contentOffset - The point at which the origin of the content view is offset from the origin of the scroll view.

By implementing and setting UIScrollView's delegate you can also handle numerous scrolling/zooming events in UIScrollView.