0

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

How can we achieve this in iPhone SDK?

Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
meetpd
  • 9,150
  • 21
  • 71
  • 119

1 Answers1

1

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.

Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167