What drawing technology would be appropriate?
I'm building an iOS application that w开发者_如何学运维ill be drawing diagrams for the user to see and manipulate (move, add, remove elements) and I'm having trouble choosing how to implement the actual rendering.
I find the default cocoa-touch controls to be too limited for this purpose yet graphics frameworks such as Quartz/OpenGL ES/Cocos2D seem a bit overkill.
Can anyone suggest an approach to this situation or perhaps a library better suited to my needs?
Thank you.
You can have each drawn object (box, association) be a custom UIView subclass added as a separate subview of your main view. Each subview can catch events from finger touches.
Apple's Touches sample code shows how to receive events on subviews and move them in response to dragging motions.
精彩评论