Home News Forum Social Networking Support Us Advertise

Spanish Lesson 1 ($1.99)

aWake!Gently ($1.99)

The Bird & The Snail - Knock Knock - Deluxe ($4.99)

Match-It Trains ($0.99)

Tangled ($0.99)

iFlatter ($0.99)

The 15 puzzle ($0.99)

Tap Forms Database ($8.99)

Higher or Lower Card Game (Hi Lo) ($0.99)

Red Pixel ($0.99)

Time-Shift Radio ($0.99)

Want your application advertised here? Only $10/week!

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)
Junior Member
 
Join Date: Nov 2008
Posts: 12
Rep Power: 0
pilotinspektor is on a distinguished road
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)
Senior Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Rep Power: 3
RickMaddy is on a distinguished road
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)
Junior Member
 
Join Date: Nov 2008
Posts: 12
Rep Power: 0
pilotinspektor is on a distinguished road
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)
Senior Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Rep Power: 3
RickMaddy is on a distinguished road
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)
Senior Member
 
Join Date: Sep 2008
Posts: 154
Rep Power: 1
ipodtouchmaster05 is on a distinguished road
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)
Junior Member
 
Join Date: Nov 2008
Posts: 12
Rep Power: 0
pilotinspektor is on a distinguished road
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)
Junior Member
 
Join Date: Nov 2008
Posts: 12
Rep Power: 0
pilotinspektor is on a distinguished road
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


» Advertisements


» Stats
Members: 8,229
Threads: 20,197
Posts: 90,213
Top Poster: RickMaddy (2,121)
Welcome to our newest member, jrsiqueira
Powered by vBadvanced CMPS v3.1.0

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