Remove a UIBezierPath drawing?
<p>I m working on digital signature on <code>UIView</code>. I create it Normally by this code, but I am not able to remove bezier path on button click. New <code>BezierPath</code> not created when click on button. I am sharing my code please look at my code.</p>

<pre><code>       //Create Class for UIView
        #import "SignView.h"
        {
            UIBezierPath *path;
        }
        - (id)initWithCoder:(NSCoder *)aDecoder
        {
            if (self = [super initWithCoder:aDecoder])
            {
                [self setMultipleTouchEnabled:NO];
                [self setBackgroundColor:[UIColor whiteColor]];
                path = [UIBezierPath bezierPath];
                [path setLineWidth:2.0];
            }
            return self;
        }

        - (void)drawRect:(CGRect)rect 
        {
            [[UIColor blackColor] setStroke];
            [path stroke];
        }
        - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
        {
            UITouch *touch = [touches anyObject];
            CGPoint p = [touch locationInView:self];
            [path moveToPoint:p];
        }
        - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
        {
            UITouch *touch = [touches anyObject];
            CGPoint p = [touch locationInView:self];
            [path addLineToPoint:p];
            [self setNeedsDisplay];
        }
        - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
        {
            [self touchesMoved:touches withEvent:event];
        }
        - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
        {
            [self touchesEnded:touches withEvent:event];
        }
        - (void)erase
        {
            path = nil;
            path = [UIBezierPath bezierPath];
            [path setLineWidth:2.0];
            [self setNeedsDisplay];

        }

        //viewController.m

        - (IBAction)clearSign:(id)sender {
            SignView *clrView = [[SignView alloc]init];
            [clrView erase];
        }
</code></pre>