I was wondering if there is a way to capture an UIImage
as it appears as-is viewed in an UIImageView
based on its contentMode
You can capture a "screen shot" of the way a UIImageView is actually displayed by calling CALayer's renderInContext:
method.
https://developer.apple.com/library/ios/documentation/graphicsimaging/reference/CALayer_class/Introduction/Introduction.html#//apple_ref/occ/instm/CALayer/renderInContext: