Real odd one to get stuck on but weirdly I am.
You you have a imageView
containing a image. You size that imageView
down and then tell it to use UIViewContentModeScaleAspectFit
. so your imageView
might be 300 by 200 but your scaled image within could be 300 by 118 or 228 by 200 because its aspectfit
.
How on earth do you get the size of the actual image?
imageView.image.size
is the size of the original image.
imageview.frame
is the frame of the imageview
not the contained image.
imageview.contentstretch
does not work either