问题
I want to create a mind mapping like app in iOS, but not sure how I am suppose to do that there are several questions in mind.
- Should I use quartz2d?
- How quartz2d will manage dynamic drawing placing, like if I want to move something then lines or connections will move accordingly.
- How will flow chat expand, like how it will expand and user will keep getting the scrolling so drawing is not limited to fix area.
回答1:
- Yes
- You have to keep track of lines and objects in a model, and update them appropriately when things are added/deleted/moved.
- Subclass
UIScrollView
and override thedrawRect
method to draw the flow chart. Change thecontentSize
to expand the drawing area as necessary, which enables scrolling at the same time. Also, you can enable the zoom feature if desired.
来源:https://stackoverflow.com/questions/24819339/need-help-understanding-to-create-a-mind-mapping-or-flow-charting-app