0
컷 아웃 마스크 염색 :나는 변경되지 않은 남아 원 영역 외부 화면 어두워 기능의 기초로이를 사용
Mask a UIView with a cut-out circle
하지만 내가하고 싶은 것은 선택적으로하는 것입니다 동그라미를 붉게하지만 모든 시도는 실패했습니다. 나는 어디로 잘못 가고 있니?
[[self fillColor] set];
UIRectFill(rect);
CGContextRef context = UIGraphicsGetCurrentContext();
UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect: self.circleFrame];
if (self.tintCircle)
{
float red[4] = {1,0,0,1};
CGContextSetFillColor(context, red);
[path fill];
}
else
{
[path fillWithBlendMode:kCGBlendModeDestinationOut alpha:1.0];
}