1

でこのコードを使用して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ユーザーが画像の描画を終了したかどうかを確認するにはどうすればよいですか?

4

0 に答える 0