I have a UIView with this structure inside it:
UIView
-- UIImageView -- -- UIImageThe JPG image is vertical, and it's the same size of the device in the vertical orientation.
I want the UIImage to rotate this as follow:Device is vertical:
The image is shown full size (fills the screen)Device is horizontal:
- 开发者_如何学运维The image width should match the device width in horizontal orientation - The image height should be calculated to NOT DEFORM the image (so its bottom part will be out of the UIImageView)I'm going crazy trying to solve this.
Anybody have already solved this problem?Thank you in advance.
You could try playing around with the contentMode property of your UIImageView. Let me know if that worked.
You simply calculate and set the transform property of the views you want to deform.
精彩评论