I have a UIImageView that is housed inside a UIScrollView. The image in the image view is bigger than the iPhone’s screen. What I want to do is have the image proportionately scaled to fit the width of the screen without changing the aspect ratio of the image (part of the image would be offscreen on the bottom).
I’ve tried using UIViewContentModeScaleAspectFill and UIViewContentModeScaleAspectFit but neither does what I want.
Any ideas?
Thanks.
Here’s an image class I wrote to do some simple functions like this, fitInsideWidth is the function that should apply here:
MyImage.h
MyImage.m