I have an ImageView which is already resized to be a circle, and it contains an image inside, which is already fitted to fill the circle. The only problem is when I open the image in another part of my app it is not a circle but rather in its original form. This is because I didn't resize the image, but rather the ImageView. So my question is how can I crop the image to be the same as it looks (a circle)? Or, if there's a better solution to this like resizing the image rather than the View I would love to hear it!
Here is the code I'm using to resize the ImageView:
self.profilePic.layer.cornerRadius = (self.profilePic.frame.size.height+20)/ 2;
self.profilePic.layer.masksToBounds = YES;
self.profilePic.clipsToBounds = YES;