AspectFit Not Working for Transformed UIImageView
Posted
by
Dex
on Stack Overflow
See other posts from Stack Overflow
or by Dex
Published on 2012-10-28T10:43:16Z
Indexed on
2012/10/28
11:00 UTC
Read the original article
Hit count: 205
I have a UIImageView inside a subview and I'm trying to get an AspectFit
content mode working how I want for a 90 degree transformation.
Here is a demo app of what I mean https://github.com/rdetert/image-scale-test
If you run the app and hold it in a landscape orientation (app runs in landscape) you'll see that the image does not stretch from left edge to right edge.
What seems to be happening is that the AspectFit
works correctly for the portrait/default orientation, but then the image simply gets rotated the image after the fact.
How can I make it auto stretch? I think the fact that it is inside a subview may have something to do with it?
© Stack Overflow or respective owner