how can i get the scale factor for UIImageView mode which is AspectFit?
That is, I have a UIImageView with AspectFit mode. The image (square) scales to my UIImageView frame, which is a good one.
If I want to get the scale size that was used (for example, 0.78 or something else), how can I get it directly?
I do not want to compare the width of the parent view with the width of the UIImageView, since the calculation should take into account the orientation, noting that I am scaling the square image in a rectangular view. Therefore, why was I a direct way to request a UIImageView to find out.
EDIT: I need it to work for both iPhone and iPad.
ios iphone uiview uiimageview
Greg
source share