Domlin
Domlin

Reputation: 195

how to draw a blur line with finger touches on iPhone?

How do I draw a blur line with a finger slide/touch motion on the iPhone? I have the following code but it is not worked. It do it wit core-graphics.some sample code? Thanks!!

CGContextSetLineCap(context, kCGLineCapRound);
CGContextSetLineJoin(context, kCGLineCapRound);
CGContextSetLineWidth(context, self.lineWidth);

CGContextSaveGState(context);
{

    CGContextSetShadowWithColor(context, CGSizeMake(-2.0f, 2.0f), 7.0f, BLACK.CGColor);

    CGContextBeginPath(context);
    CGContextSetStrokeColorWithColor(context, self.lineColor.CGColor);
    CGContextAddPath(context, path);

    CGContextStrokePath(context);
}
CGContextRestoreGState(context);

CGPathRelease(path);

Upvotes: 0

Views: 1002

Answers (1)

Rishabh
Rishabh

Reputation: 62

Here is the code for simple drawing method. Hope this will help you to implement your code.

Upvotes: 1

Related Questions