Transparent Ring in iOS
I have a circle avatar on my view. I make it like this: self.imageView.layer.cornerRadius = 75; self.imageView.layer.masksToBounds = YES; self.imageView.layer.borderWidth = 1; self.imageView.layer.borderColor = [UIColor whiteColor].CGColor; But I want transparent 2px ring between avatar and white border. I can't draw a white circle on the background, because the avatar can move and ring position will be lost. I have the idea to stroke path using CGContextSetBlendMode(context, kCGBlendModeClear); after assigning the layer, but I don't catch how exactly do it. Appreciate for your help. that