I want to have a larger frame than an image so i do something like this:
And of course i have UIScrollViewDelegate
and i handle the zooming. But there is one problem. When i zoom picture i can scroll to this "blue" empty space in a zoom mode.
After zoom when my zoom picture width is greater than scrollView width i wish that user cannot scroll to this empty space. How can i achieve that?
(1) zoomScale 1.0:
(2) after zoom and move to edge:
(3) what i want it to be:
EDIT: After setting contentInset:
[self.scView setContentInset:UIEdgeInsetsMake(0, -30, 0, -(self.frame.size.width-csc.width/2))];
Why it is moving to left?