fingerpaint

Started by
3 comments, last by xEricx 13 years, 1 month ago
i want to make a fingerpaint app for ipad. can someone tell me how to detect a drag event on ipad?

i basically need to get these for the drag event

startx
starty
endx
eny
Advertisement

i want to make a fingerpaint app for ipad. can someone tell me how to detect a drag event on ipad?

i basically need to get these for the drag event

startx
starty
endx
eny


I never developed for iOS but this should be one of the basic event you can handle and it's for sure in the documentation... did you search for more than 30 secs before posting here? ;)

[quote name='ms75214' timestamp='1300301684' post='4786682']
i want to make a fingerpaint app for ipad. can someone tell me how to detect a drag event on ipad?

i basically need to get these for the drag event

startx
starty
endx
eny


I never developed for iOS but this should be one of the basic event you can handle and it's for sure in the documentation... did you search for more than 30 secs before posting here? ;)
[/quote]

i found this



- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;




- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;




- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;




- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event




i think touchesMoved might work


[quote name='xEricx' timestamp='1300310825' post='4786753']
[quote name='ms75214' timestamp='1300301684' post='4786682']
i want to make a fingerpaint app for ipad. can someone tell me how to detect a drag event on ipad?

i basically need to get these for the drag event

startx
starty
endx
eny


I never developed for iOS but this should be one of the basic event you can handle and it's for sure in the documentation... did you search for more than 30 secs before posting here? ;)
[/quote]

i found this



- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;




- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;




- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;




- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event




i think touchesMoved might work


[/quote]



also, this might help

[font=verdana, geneva, lucida,]- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPosition = [touch locationInView:self.view]; CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x); CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y); if (deltaX >= kMinimumGestureLength && deltaY <= kMaximumVariance) { // handle horizontal swipe } else if (deltaY >= kMinimumGestureLength && deltaX <= kMaximumVariance){ // handle vertical swipe... } }[/font]
http://ipad.headline...-image-uitouch/

3rd or 4th link on google, please do your homework :(

This topic is closed to new replies.

Advertisement