Problems with Multi-Touch
Web Development and Internet Marketing Forum :: Forum :: Application Development :: Mobile Application Development
Page 1 of 1
Problems with Multi-Touch
Hi everybody, I'm new here and I don't know if this is the right sub-forum.
I have some problems with the multi-touch for iOS. I thought "touchesBegan" from the UIView will always be called when a new finger touches the screen.
But it don't. It only occurs when the first finger touches the screen and "touchesEnded" occurs when the first finger releases the screen.
But I want to know when a new finger touches the screen. I don't know how to determine that in my program.
Another problem is that the "touchesMoved" only occurs when the first finger moves. The other fingers also get a movement information but this function will only be called when the first finger moves.
And the third problem I have is that the indices of the touches changes when new fingers touche the screen.
i.e. when I go-through the NSSet of all "[event allTouches]" the first touch can sometimes change to the second one when a new finger touches the screen.
This is my current code part:
Code:
My C functions "iOS_SetTouchBegin", "iOS_SetTouchEnd" and "iOS_SetTouchMove" always get the Index of the individual touch event.
But this is never guaranteed the correct Index.
I hope you understood my problem and anyone can help me.
Greetings,
I have some problems with the multi-touch for iOS. I thought "touchesBegan" from the UIView will always be called when a new finger touches the screen.
But it don't. It only occurs when the first finger touches the screen and "touchesEnded" occurs when the first finger releases the screen.
But I want to know when a new finger touches the screen. I don't know how to determine that in my program.
Another problem is that the "touchesMoved" only occurs when the first finger moves. The other fingers also get a movement information but this function will only be called when the first finger moves.
And the third problem I have is that the indices of the touches changes when new fingers touche the screen.
i.e. when I go-through the NSSet of all "[event allTouches]" the first touch can sometimes change to the second one when a new finger touches the screen.
This is my current code part:
Code:
- Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
NSSet* touchSet = [event allTouches];
int i = 0;
for (id touch in touchSet)
{
CGPoint Point = [touch locationInView:self];
iOS_SetTouchBegin(i++, Point.x, Point.y);
}
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
NSSet* touchSet = [event allTouches];
int i = 0;
for (id touch in touchSet)
{
CGPoint Point = [touch locationInView:self];
iOS_SetTouchMove(i++, Point.x, Point.y);
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];
NSSet* touchSet = [event allTouches];
int i = 0;
for (id touch in touchSet)
iOS_SetTouchEnd(i++);
}
My C functions "iOS_SetTouchBegin", "iOS_SetTouchEnd" and "iOS_SetTouchMove" always get the Index of the individual touch event.
But this is never guaranteed the correct Index.
I hope you understood my problem and anyone can help me.
Greetings,
kevin619- Posts : 38
Join date : 2011-12-19
Location : California
Web Development and Internet Marketing Forum :: Forum :: Application Development :: Mobile Application Development
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Tue Oct 08, 2013 1:53 pm by ctsseo
» Hey I am The Head developer of MinecraftStuff
Fri Mar 29, 2013 1:13 pm by Admin
» PHP and Notepad++
Fri Dec 28, 2012 3:21 am by MinecraftStuffDev
» Pakistan Cricket Team Face 1st T20 Against India On 25th Dec 2012
Tue Dec 25, 2012 9:46 am by tallat
» Learning SEO
Sun Dec 23, 2012 5:19 am by GordonH
» Guest Blogging ?
Sun Dec 23, 2012 5:18 am by GordonH
» SEO strategies for 2012!
Sun Dec 23, 2012 5:15 am by GordonH
» The best way to get traffic for your site
Sun Dec 23, 2012 5:10 am by GordonH
» How Can I increase the traffic for my Web site??????
Wed Oct 24, 2012 6:15 am by kevin619