でこのコードを使用してUITouches Moved
、画像を描画しています。
UIGraphicsBeginImageContext(myimage.frame.size);
[myimage.image drawInRect:myimage.frame];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 10);
CGContextSetStrokeColorWithColor(UIGraphicsGetCurrentContext(), [UIColor colorWithPatternImage:[UIImage imageNamed:@"coloredImage.png"]].CGColor);
CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(), [UIColor clearColor].CGColor);
CGContextSetShouldAntialias(UIGraphicsGetCurrentContext(), YES);
CGContextBeginPath(UIGraphicsGetCurrentContext());
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), previous.x, previous.y);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), touchLocation.x, touchLocation.y);
CGContextStrokePath(UIGraphicsGetCurrentContext());
myimage.image = UIGraphicsGetImageFromCurrentImageContext();
previous = touchLocation;
ここでは、ユーザーが画像を完全に描画したときにアラートを作成する必要があります...つまり、パターン画像がmyimage
あり、ユーザーがタッチcoloredImage
したときに描画される画像です。myimage
ユーザーが画像の描画を終了したかどうかを確認するにはどうすればよいですか?