How can pixels be drawn at a touch location?
If the user touches a certain area of a view, how are the locations used to draw/mark the loca开发者_如何学Gotion with e.g black color?
What kind of view is this or how is this drawing done?
Generally, if you're using Quartz you'll:
handle your touch events
store the points that are streaming in in some datastructure
invalidate your view so it draws
override drawRect and draw the points you stored in 2.
UIBezierPath is a class that can help with this. You can essentially "draw into" an instance of UIBezierPath when you receive the touch events, then render the object in drawRect.
精彩评论