which touch event to use to slide an image?
i am using the following function to move a ball from one location to another wherever user touches the screen..right now i dont have an i-phone to test my application and i am new to i-phone application programming so i wanted to know does this event will also make the ball slide from one point to another wen user maintains the touch??
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch=[[event allTouches] anyObject]; CGPoint location=[touch locationInView:to开发者_JAVA技巧uch.view]; fball.center=location; }
Implement -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
and -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
精彩评论