Issue of CGContext
<p>I want to draw a line in the rect of <code>UIView</code> when I touch screen.
Please can someone help me to check the code!</p>

<pre><code>- (void)drawRect:(CGRect)rect {
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetLineWidth(context, 5.0);
    CGContextSetStrokeColorWithColor(context, [UIColor greenColor].CGColor);
    CGContextSetFillColorWithColor(context, [UIColor greenColor].CGColor);
    CGContextMoveToPoint(context, 100.0, 30.0);
    CGContextAddLineToPoint(context, 200.0, 30.0);
    CGContextStrokePath(context);
}
</code></pre>
