I have an image inside a UIImageView that is inside a UIScrollView. What I want to do is rotate this image 90 degrees so that it is in the landscape by default, and set the initial image scaling so that the whole image fits into the scroll, and then allows it to be scaled to 100% and back down to the minimum magnification .
This is what I have so far:
self.imageView.transform = CGAffineTransformMakeRotation(-M_PI/2);
float minimumScale = scrollView.frame.size.width / self.imageView.frame.size.width;
scrollView.minimumZoomScale = minimumScale;
scrollView.zoomScale = minimumScale;
scrollView.contentSize = CGSizeMake(self.imageView.frame.size.height,self.imageView.frame.size.width);
The problem is that if I set the conversion, nothing is displayed in scrollview. However, if I commented on the conversion, everything works, except that the image is not in the landscape orientation in which I want it to be!
, minimumZoomScale zoomScale, , , contentSize - / , , .
NB: URL