Quote:
Originally Posted by syncmaster
Hello,
I have difficulty in coding on how to move geometry shapes around generated by core graphics framework. In UItouch, I made a rectangle, circle shape then, I would want to drag them around like UIImageView objects.
thanks
|
If you want to use core graphics to drag shapes around on the screen, the burden is on you to do all the housekeeping to make it work.
You will need to implement a custom subclass of UIView and either use gesture recognizers (new to iOS >= 3.2 ) or touchesBegan / touchesMoved / touchesEnded. To do the image dragging you'll need to call setNeedsDisplayInRect on the view, and then draw your shapes in the drawRect method.