以下のコードをフィルパスに使用すると、viewDidLoad
完璧に機能します
UIGraphicsBeginImageContext(_drawingPad.frame.size);
CGContextRef context1 = UIGraphicsGetCurrentContext();
CGContextMoveToPoint(context1, 300, 300);
CGContextAddLineToPoint(context1, 400, 350);
CGContextAddLineToPoint(context1, 300, 400);
CGContextAddLineToPoint(context1, 250, 350);
CGContextAddLineToPoint(context1, 300, 300);
CGContextClosePath(context1);
//CGContextStrokePath(context1);
CGContextSetFillColorWithColor(context1, [UIColor redColor].CGColor);
CGContextFillPath(context1);
CGContextStrokePath(context1);
また、タッチが始まると線を作成しています..しかし、線を作成する前にフィルパスが消去されます..