Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the most low-level official touch input API which can be accessed from developers? (iPhone)

What's the most low-level official touch input API which can be accessed from developers? (iPhone)

like image 591
eonil Avatar asked Oct 17 '25 15:10

eonil


2 Answers

According to my experience the lowest level where you can intercept and handle all the touches is UIApplication (its derived from UIResponder). There is nothing really hard here, as you only have to override:

- (void)sendEvent:(UIEvent *)event
{
    [super sendEvent:anEvent];
    /* Place your custom */
    /* processing code here*/
}
like image 67
Mike S. Avatar answered Oct 20 '25 07:10

Mike S.


The touches objects inside of a UIResponder class.

http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/cl/UIResponder

You have access to touchesMoved, touchesBegan, and touchesEnded. You can do just about anything with these.

like image 45
Aaron Ash Avatar answered Oct 20 '25 07:10

Aaron Ash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!