我现在正在制作这种绘制线条的方法,我想要的是用另一种方法调用它我该怎么做,请帮我解决这个问题,我该如何在 self.view 中添加它?
- (void)drawRect:(CGRect)rect
{
     CGContextRef context = UIGraphicsGetCurrentContext();
     CGContextSetLineWidth(context, 5.0);
     CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
     CGFloat dashArray[] = {2,6,4,2};
     CGContextSetLineDash(context, 3, dashArray, 4);
     CGContextMoveToPoint(context, 10, 200);
     CGContextAddQuadCurveToPoint(context, 150, 10, 300, 200);
     CGContextStrokePath(context);
 }