다음 코드를 사용하여 이동 한 터치를 기반으로 한 선을 MS 페인트에 그대로 그립니다. 괜찮 았어.하지만 끝난 터치 후 다시 선을 그릴 때 이전 선이 지워졌다. 도움이 필요하십니까?CGcontext의 마지막 내용이 저장되지 않습니까?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
mouseSwiped = NO;
UITouch *touch = [touches anyObject];
if ([touch tapCount] == 2)
{
//drawImage.image = nil;
//alphavalue = 0.0;
//isErase = TRUE;
//return;
}
lastPoint = [touch locationInView:self.view];
}
솔루션 pls –