开发者

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

开发者 https://www.devze.com 2022-12-21 01:43 出处:网络
What\'s the most low-level official touch input API which c开发者_如何学Can be accessed from developers? (iPhone)According to my experience the lowest level where you can intercept and handle all the

What's the most low-level official touch input API which c开发者_如何学Can be accessed from developers? (iPhone)


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*/
}


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.

0

精彩评论

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