I am using 'Aspect Fit
' mode imageview
in a full screen in Swift storyboard. Actual image is fitting well keeping the ratio. Problem is i cannot get the actual image width/height on runtime.
When I use imageview.frame.size.width
, it's returning the full screen width as expected. When I use image.size.width
, it's returning the fixed image width (actual image width). But my intention is to get the runtime image width which is being shown in the UI.
How to find it from source.
EDIT 1
Current portrait screen with label in the middle
Current landscape screen with label in the middle. Label width is same to imageview
but not the currently displaying image width.