クリッピングで丸くしたい40x40の正方形の画像がありますが、画像の周りに黒い5ピクセルの境界線も付けます。
私は正方形の画像をマスキングしている次のものを持っているので、今は丸いです
UIImage *image = self.imageView.image;
CGSize imageSize = image.size;
CGRect imageRect = CGRectMake(0, 0, imageSize.width, imageSize.height);
UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0.0);
// Create the clipping path and add it
UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:imageRect];
[path addClip];
[image drawInRect:imageRect];
UIImage *roundedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.imageView.image = roundedImage;
しかし、今度はその周りに丸い境界線も追加する必要があります. 新しいパスが必要ですか、それとも上記のコードの 1 つに追加できますか?