我正在使用下面的代码来绘制一个基于触摸移动,因为它是在MS Paint? 它工作正常。但当我尝试在触摸结束后再次画线时,上一行会被删除..请帮忙吗?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];
}
我无法理解您的解决方案请致电 – 2011-03-14 05:30:03