Guest User

Untitled

a guest
Jan 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. CGFloat widthScale = self.scrollView.bounds.size.width / self.image.size.width;
  2. CGFloat heightScale = self.scrollView.bounds.size.height / self.image.size.height;
  3.  
  4. // just reset the zoom scales; leave center and everything else where possible
  5. self.scrollView.minimumZoomScale = MIN(1.0, MIN(widthScale, heightScale));
  6. self.scrollView.maximumZoomScale = 4.0;
Add Comment
Please, Sign In to add comment