How can I programmatically apply a circular crop out to a UIImage
or a UIImageView
? Is it possible, or must I use a graphical mask?
Till now I am using a graphical mask (a png image) but the final crop out result is ovalized, rather than a perfect circle.
[imageView setContentMode: UIViewContentModeScaleAspectFit];
[imageView setContentMode: UIViewContentModeScaleAspectFill];
also do not solve the problem.
Please note that the UIImageView
that the image is applied to is already defined exactly as a square in IB.