Rounded Corner images <p>I've been trying to do perfectly shaped circular images with non-square images. I tried to make it with </p> <pre><code>[self.photoView.layer setCornerRadius:50.0f]; [self.photoView.layer setMasksToBounds:YES]; </code></pre> <p>It becomes something like this:</p> <p><img src="https://i.stack.imgur.com/ftyrj.png" alt="Not so perfectly rounded"></p> <p>I want to make it full perfect circular. </p> <p>PhotoView's content mode is setted to Aspect Fill, It's height and width fixed to 80x80 with autolayout. I could not figure it out.</p> <p>I made circular images with cropping and scaling them, but also want to add a border to it, in this way i need to recreate new uiimage to draw borders in it. It's expensive thing. I want to use photoView's layer to do this. </p> <p>Any help is appreciated.</p>