I'm using quartz-2d to do a school project. I have implement a user interface like the following.
开发者_JS百科My question is how to implement touch function under quartz-2d ? For example when I touch some area in the menu will draw another picture?
Thanks
Quartz or no, you're still drawing into a view, and you probably still have a view controller, right? Both the view and the view controller are subclasses of UIResponder, so implement the usual -touchesBegan:withEvent:, -touchesEnded:withEvent:, etc. Since it's probably your view that knows how the various parts of your UI are drawn, it would make sense for the view to handle the touches, figure out which part of the UI was touched, and send higher-level messages to the view controller.
精彩评论