Set a delegate for your scroll view. Probably you want your view controller to be the delegate. You need to add UIScrollViewDelegate
to its list of protocols.
Then, in the delegate, implement scrollViewDidScroll:
. In scrollViewDidScroll:
, look at the scroll view's contentOffset
. Based on the contentOffset
, set the image view's transform
and center
to rotate and move it where you want.