【发布时间】:2011-03-14 04:48:06
【问题描述】:
我正在使用以下代码绘制一条基于触摸移动的线条,就像在 MS Paint 中一样? 它工作正常。但是当我尝试在触摸结束后再次画一条线时,上一条线被删除了..有什么帮助吗?
- (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];
}
【问题讨论】:
标签: iphone ipad ios4 cgcontext