I am drawing a graph where the graph scales on zooming in. The graph view is the contentView of scrollview. I also have a graph axis view placed just under the graphview (having same width) which is a regular UIView but I manage the positioning of labels on this view myself according to the zoom scale and panning. I found that my label positioning were not syncing with the graph content correctly (while zooming). I redraw the content after zooming ends.
Apple docs say that zooming occurs around the visible content
Zooming Programmatically
Now if the visible content is same as the size of the frame, the contentView center should not move, but I found in the -(void)scrollViewDidZoom:(UIScrollView *)scrollview method by NSloging the contentView center that it moves in +ve x(to the right)slightly as I zoom-in more and more. I expected it to remain stationary.Is it a bug or am I missing something ?
PS: I understand that if the size of contentView is less than the visible bounds of scrollview, the center will drift to the left (towards origin).