Sign in to follow this  
ms75214

fingerpaint

Recommended Posts

ms75214    143
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

Share this post


Link to post
Share on other sites
xEricx    572
[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
[/quote]

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? ;)

Share this post


Link to post
Share on other sites
ms75214    143
[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
[/quote]

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

Share this post


Link to post
Share on other sites
ms75214    143
[quote name='ms75214' timestamp='1300311405' post='4786758']
[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
[/quote]

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]

Share this post


Link to post
Share on other sites
xEricx    572
[url="http://ipad.headlinestimes.com/ipad-ipod/iphone-sdk-tutorial-drag-able-image-uitouch/"]http://ipad.headline...-image-uitouch/[/url]

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this