Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGFloat widthScale = self.scrollView.bounds.size.width / self.image.size.width;
- CGFloat heightScale = self.scrollView.bounds.size.height / self.image.size.height;
- // just reset the zoom scales; leave center and everything else where possible
- self.scrollView.minimumZoomScale = MIN(1.0, MIN(widthScale, heightScale));
- self.scrollView.maximumZoomScale = 4.0;
Add Comment
Please, Sign In to add comment