I have a 40x40 square image that I want to do with cropping, but also put a black border with 5 pixels around the image.
I have the following that masks a square image, so its now round
UIImage *image = self.imageView.image; CGSize imageSize = image.size; CGRect imageRect = CGRectMake(0, 0, imageSize.width, imageSize.height); UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0.0);
But now I also need to add a round frame around it. Do I need a new path or can I just stick on one in the code above?
source share