Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-13-2008, 04:11 PM   #1 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 12
Default Capturing Coordinates of a continous touch

Hey guys, heres what I am working on.

I need to capture the coordinates of a continuous touch as it happens at the fastest frame rate possible. Can something be done with calls to touches moved? As in storing each successive coordinate captured into an array? Thanks again!
pilotinspektor is offline   Reply With Quote
Old 11-13-2008, 04:56 PM   #2 (permalink)
New Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Default

Sure. Did you try it? In the time you posted and got a response you could have answered this yourself by trying it first.
RickMaddy is offline   Reply With Quote
Old 11-13-2008, 05:24 PM   #3 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 12
Default

Well that is as far as I got by thinking about it, I've been looking around the help files for an idea on how to implement it and the idea I have is using
- (CGPoint)locationInViewUIView *)view
to return the location of the touch in time intervals, but I have had a hard time implementing it.

I am new to developing so what is simple to some is still complicated for me. I figure this is part of the learning process and wont last long so if someone knows of a better way to do this in the SDK I would greatly appreciate it! Thanks guys.
pilotinspektor is offline   Reply With Quote
Old 11-13-2008, 05:29 PM   #4 (permalink)
New Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Default

Be more specific about what you have and what's not working. Show some code. Show what errors (if any) you get compiling the code. It's a lot easier to offer help when there is something concrete to talk about. We were all new once. One of the important skills needed by anyone, especially newer programmers, is how to ask good questions and be clear on what is needed.
RickMaddy is offline   Reply With Quote
Old 11-13-2008, 05:32 PM   #5 (permalink)
Registered Member
 
Join Date: Sep 2008
Posts: 176
Default

heres a way to track the coordinates of where you move your finger:

- (void)touchesMovedNSSet *)touches withEventUIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:self];

NSLog(@"%f", location.x);
NSLog(@"%f", location.y);
}

Then instead of nslogging you can store those in an array for later use or whatever else you want to do with them.
ipodtouchmaster05 is offline   Reply With Quote
Old 11-13-2008, 05:36 PM   #6 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 12
Default

(to RickMaddy) you're right, I was just thinking that after I posted.

I need to get continuous coordinates for a touch while it is moving so I am trying to call locationInView during touchesMoved and saving it to a point with.

Point a;
a = locationInView;
or a = locationInView(nil) to get the coordinate in reference to the whole window.

I get an error "'locationInview' undeclared (first use in this function)

Is touchesMoved the right place to be trying to get this information? Thanks.
pilotinspektor is offline   Reply With Quote
Old 11-13-2008, 05:44 PM   #7 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 12
Default

Thanks! I really appreciate it. I once again apologize for not wording my question right, it wont happen again! This information has been a huge help and Ive learned a lot.
pilotinspektor is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,145
Threads: 38,923
Posts: 170,776
Top Poster: smasher (2,565)
Welcome to our newest member, user314159
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:39 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0