Draw rectangle using Core Graphics with live preview
- by mikawber
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!