I have an UIScrollView, that contains UIImageViews. All images keep their image ratio – I mean that e.g. portrait image is high and narrow, while landscape image is short and wide. I have about 4 images at same time on screen (2 vertically, 2 horizontally), then I can scroll down.
My problem is rotating the device. I use
[self.imageScrollView setAutoresizingMask: UIViewAutoresizingFlexibleLeftMargin];// (etc)
And same method for imageView. But images don’t keep their proportions. If I set:
UIViewAutoresizingFlexibleWidth – image is wide but heigh is too small
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight – image is stretched horizontally, while vertically it’s way to small.
I need to rotate the device (portrait->landscape), make these 2 images (that I have next to each other) to fill gap and keep these images proportions.
This solved my problem ^^