UIImage resize and crop to fit
- by Amit Hagin
I read a lot, also here, but couldn't find a simple way to do it:
In objective c -
I have a big UIImage and a small UIImageView. I want to programmatically shrink the content of a UIImage just enough to fit the smaller dimension within the UIImageView. The larger dimension will be cropped, and the result will be the maximum I can get from an image without changing the proportion.
can you please help me?