开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜