I have a UIImageView created using a Storyboard inside a UIViewController .
I am trying to scale the width of the image to fit the width of the screen and scale the height proportionally:
[fImage setImage:[UIImage imageNamed: @"f2345.jpeg"]]; [fImage sizeToFit]; fImage.contentMode = UIViewContentModeScaleAspectFit; CGRect frame = filmImage.frame; frame.size.width = [[UIScreen mainScreen] bounds].size.width;
Then it shows an image that is scaled, but it is suitable for some other area, and there is a space in my image.
syntagma
source share