Which point is Contentoffset??? First of all, the literal understanding: content Offset I looked up the dictionary!!!
For Contentoffset There are times when we have a wrong understanding. I do not want to introduce the wrong understanding here to avoid unnecessary confusion.
When will we meet Contentoffset???
More often in a rolling attempt, we can implement some methods by combining proxies.
such as Carousel (I'll introduce the implementation of the carousel in the next article as to the code if needed I can sort it out) then please let me explain the contentoffset through a picture demonstration.
A
In Figure one, the green screen is the largest display range is also the scrolling view of the frame, red is the contentsize of the scrolling attempt.
We can interpret two frames as two view. The result is that the top left vertex of the two view is coincident, when the Contentoffset is {0,0}.
Two
In Figure two we shift the red to the left by 100, which is the equivalent of scrolling to the left by 100.
The result is that Contentoffset is {100,0}.
Three
So we can draw the offset of the vertex of the frame vertex relative to the current display area of the ScrollView.
IOS Contentoffset How to understand