可扩展的表格视图
如何按类别显示表格视图,并且单击一行时它将随内容展开? 我在一些应用程序中看到过它,这就是我知道它是可能的,但找不到任何有关它的参考或教程。
即使我没有示例代码,如果有人可以帮助我,我将不胜感激,因为我不知道如何开始。
How to show table view in categories and when clicked on one row it will expand with content?
I've seen it in some apps and that's how I know it is possible but can't find any reference or tutorial regarding it.
I would appreciate if someone could help me even if I don't have example code, because I don't know how to start with it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这应该通过表视图来完成。我个人是按照以下方式执行此操作的:首先有一个包含 5 个部分的表视图,每个部分中没有行,只有一个标题。单击标题时,各部分“展开” - 我将行添加到该部分(insertRowsAtIndexPaths)。如果再次单击节标题,我将从数据源中删除行 (deleteRowsAtIndexPaths)。希望这有用
I think this should be done by means of table view. I personally did this the following way: at first there was a table view with 5 sections and every section had no rows in it, only a header. When the header is clicked the sections "expands" - I add the rows to the section (insertRowsAtIndexPaths). If the section header is clicked again, I delete the rows from datasourse (deleteRowsAtIndexPaths). Hope this is useful
浏览此示例代码
https://github.com/adamhoracek/KOTree
表格视图将如下所示这个
Go through this sample code
https://github.com/adamhoracek/KOTree
The table view will look like this