Rahul Vyas
Rahul Vyas

Reputation: 28750

Draw a line using core graphics when touch moves in iphone?

how do I draw line when moving finger across screen in iPhone using core graphics.

Upvotes: 0

Views: 1520

Answers (1)

Ben Scheirman
Ben Scheirman

Reputation: 41001

You need to handle the touch events:

on touches began:

record the point & save it in an instance variable

on touches moved:

record the new ending point & save it in an instance variable

With these 2 points you can create a path & use Coregraphics to draw the path

Upvotes: 1

Related Questions