evgenyneu / ios-imagescroll

iOS: example of using image view inside a scroll view with auto layout, written in Obective-C.
60 stars 15 forks source link

View zooms out #1

Closed foFox closed 10 years ago

foFox commented 10 years ago

The view zooms out on rotation, any way around that issue ?

evgenyneu commented 10 years ago

This was done intentionally to show the whole image when orientation changes.

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    [self initZoom];
}

If you do not want that, you could change the code so that didRotateFromInterfaceOrientation calls initZoom but without changing the zoom scale. Please note that we still need to recalculate minimumZoomScale on orientation change.

Cheers