Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在类别中显示表格视图,当单击一行时,它将随内容展开?我在一些应用程序中看到过它,这就是我知道它是可能的,但找不到任何关于它的参考或教程。
即使我没有示例代码,如果有人可以帮助我,我将不胜感激,因为我不知道如何开始。
我认为这应该通过表格视图来完成。我个人是这样做的:起初有一个包含 5 个部分的表格视图,每个部分都没有行,只有一个标题。单击标题时,部分“展开” - 我将行添加到部分(insertRowsAtIndexPaths)。如果再次单击节标题,我会从数据源中删除行(deleteRowsAtIndexPaths)。希望这是有用的
浏览此示例代码
https://github.com/adamhoracek/KOTree
表格视图将如下所示