Cocoa touch touchesEnded:未被调用,而是touchesCancelled:之后是崩溃

Cocoa touch touchesEnded:未被调用,而是touchesCancelled:之后是崩溃,cocoa-touch,exception,ios5,Cocoa Touch,Exception,Ios5,当我在我的应用程序中在屏幕上滑动时,有时touchesend:不会被调用,而touchescelled:会被多次调用,然后是EXC\u BAD\u ACCESS崩溃。我该怎么做?请粘贴您的问题代码。您好,这里是我的代码-(void)touch moved:(NSSet*)touch with event:(UIEvent*)event{UITouch*theTouch=[触摸任何对象];CGPoint touch location=[触摸位置查看:self.view];CGFloat x=tou

当我在我的应用程序中在屏幕上滑动时,有时
touchesend:
不会被调用,而
touchescelled:
会被多次调用,然后是
EXC\u BAD\u ACCESS
崩溃。我该怎么做?

请粘贴您的问题代码。您好,这里是我的代码-(void)touch moved:(NSSet*)touch with event:(UIEvent*)event{UITouch*theTouch=[触摸任何对象];CGPoint touch location=[触摸位置查看:self.view];CGFloat x=touchLocation.x;CGFloat y=touchLocation.y;}-(void)touchSedend:(NSSet*)touch with event:(UIEvent*)event{UITouch*theTouch=[触摸任何对象];CGPoint endPoint=[触摸位置视图:self.imageView];CGFloat x=endPoint.x;CGFloat y=endPoint.y;}-(void)touch取消:(NSSet*)触碰事件:(UIEvent*)事件{UITouch*触碰=[触碰任何对象];CGPoint端点=[触碰位置视图:self.imageView];CGFloat x=端点.x;CGFloat y=端点.y;}-(void)触碰开始:(NSSet*)触碰事件:(UIEvent*)事件{UITouch*触碰=[触碰任何对象];起始点=[触摸位置视图:self.imageView];CGFloat x=startPoint.x;CGFloat y=startPoint.y;}