Hi together,
I need to clip a path. Why this doesnt work?
CGContextRef context = UIGraphicsGetCurrentContext();
UIGraphicsBeginImageContext(self.frame.size);
CGContextRef newContext = UIGraphicsGetCurrentContext();
[[UIColor redColor] setFill];
CGContextFillRect(newContext, CGRectMake(0, 0, 100, 100));
CGImageRef mask = CGBitmapContextCreateImage(UIGraphicsGetCurrentContext());
UIGraphicsEndImageContext();
[[UIColor redColor] set];
CGContextAddRect(context, rect);
CGContextClipToMask(context, rect, mask);
CGContextFillPath(context);Walter