简单但动态生成的 iOS 流程图或流程图视图
也许“流程图”或“流程图”甚至不是我正在寻找的正确术语,但它是我能想到的最好的类比。基本上,我试图找到一个库或类,允许在给定空间内动态创建(在代码中)连接的单元格/UIView。在代码中,您可以从视图中添加/删除有序单元格,它会相应地排列。通常,如果超级视图大小允许(即iPad),它会水平排列这些连接的单元格。如果空间有限(iPhone),它会在水平线上排列尽可能多的单元格,然后在下方水平继续其余单元格......类似于图形“自动换行”。
诚然,我怀疑是否有一个神奇的库可以完成所有这一切,但如果 SO 社区可以为我指出一些更好的术语和/或一些潜在的候选者,我将非常感激。
我看过 AQGridView 它是一个如此庞大的库,我相信它的编译大小有点过大+700 KB。 SSCollectionView 非常接近,但是您必须手动将单元格居中,并且它还不支持可变单元格高度/宽度。
为了让您更好地了解我的想象,这里有一张图片:
Perhaps "flow chart" or "process chart" isn't even the correct terminology for what I'm looking for, but it's the best analog I can come up with. Basically, I'm trying to find a library or class that allows for the dynamic creation (in code) of connected cells/UIViews within a given space. In code, you could add/delete ordered cells from the view and it will arrange accordingly. Normally, if the superview size permits (i.e. iPad), it would arrange these connected cells horizontally. If it's space constrained (iPhone), it would arrange as many cells as possible on one line horizontally, then continue the rest of the cells horizontally below ... akin to a graphical "word wrap".
Granted, I doubt there's a magical library that does all of this, but if the SO community can point me to some better terminology and/or some potential candidates to fork, I would be incredibly appreciative.
I've looked at AQGridView and it is such a vast library, I believe it's overkill with a compiled size of +700 Kb. SSCollectionView is really close, but you have to manually center cells and it doesn't yet support variable cell height/width.
To give you a better sense of what I'm imagining, here's a pic:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
完毕。我必须自己编写,但它的工作原理就像我想要的那样。请随意在 GitHub 上分叉我的 AppendingFlowView 存储库。
Done. I had to write my own, but it works just like I wanted it to. Feel free to fork my AppendingFlowView repository at GitHub.
我创建了这个开源 ios-lib 来轻松创建图形或树并将其绘制在视图中。
请随时提出拉取请求:)
https://github.com/chikuba/JENTreeView
I created this open-source ios-lib to easily create a graph or tree and draw it in a view.
Please feel free to make pull requests :)
https://github.com/chikuba/JENTreeView