开发者

IPhone SDK: detect which touch came first on a 2 touch max application

开发者 https://www.devze.com 2023-01-09 01:10 出处:网络
Coding inside the function -(void) ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event receivin开发者_如何学编程g 2 touches in the \"event\" variable, how can one detect which touch has lived lon

Coding inside the function -(void) ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event receivin开发者_如何学编程g 2 touches in the "event" variable, how can one detect which touch has lived longer? i know i could use global variables and in the touchbegin just update these variables, but I rather do it the better way, if there is any.


How about comparing the UITouch timestamp properties?


Eventually I stored pointers to the touches. saving a timestamp manually, found no other way.

0

精彩评论

暂无评论...
验证码 换一张
取 消