I have an image that I want to load into the image view and set the minimum ZoomScale value as well as the zoom scale to the scalable aspectFill value, which I calculate as follows:
The iScrollView is 450 x 320 pixels in size and the iImageSize is 1600 x 1960 pixels.
Performing the MinimumZoomScale math manually: 450/1960 = 0.22959184. Instead, the system determines 0.234693885 (???).
But for the window to fit into the space of 450 pixels, both shapes do not work (!!!). I manually tried and found 0.207 - this is the correct number (which will translate to an image height of 2174 xp or, alternatively, a UIScrollView height of 406px).
For information: the UIScrollview screen is 450 pixels, namely 480px minus the height of the status bar (10), minus the height of the UITabBar (20)
Any clues about this abnormal behavior?
objective-c iphone xcode
user306766
source share