iphone - How to scale a UIImageView proportionally? - Stack Overflow @interface UIImage (Extras) - (UIImage *)imageByScalingProportionallyToSize:(CGSize)targetSize; @end; @implementation UIImage (Extras) - (UIImage *)imageByScalingProportionallyToSize:(CGSize)targetSize { UIImage *sourceImage = self; UIImage *newImage = nil; CGSize imageSize = sourceImage.size; CGFloat width = imageSize.width; CGF