Draw rectangle using Core Graphics with live preview

Posted by mikawber on Stack Overflow See other posts from Stack Overflow or by mikawber
Published on 2010-05-04T17:03:40Z Indexed on 2010/05/04 17:08 UTC
Read the original article Hit count: 222

Filed under:
|

I'm creating a simple drawing application and would like some help with drawing rectangles based on the user's touch events. I'm able to draw a rectangle using Core Graphics from the point in touchesBegan to the point in touchesEnded. This rectangle is then displayed once the touchesEnded event is fired.

However, I would like to be able to do this in a 'live' fashion. Meaning, the rectangle is updated as the user drags their finger. Is this possible? Any help would be greatly appreciated, thank you!

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about core-graphics