开发者

How to draw on screen using hand gestures in iPhone SDK?

开发者 https://www.devze.com 2023-03-01 07:02 出处:网络
I want to draw on screen by moving my fingers across the screen. How can we achieve this in i开发者_JAVA技巧Phone SDK?You first need to implement the touch sensing methods from UIResponder chain. The

I want to draw on screen by moving my fingers across the screen.

How can we achieve this in i开发者_JAVA技巧Phone SDK?


You first need to implement the touch sensing methods from UIResponder chain. The methods you need to implement are

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

Inside this methods you can use Core Graphics drawing methods to draw custom drawing. This tutorial will walk you through the steps.

0

精彩评论

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