这个问题在这里已经有了答案:
Best Answer-推荐答案 strong>
当单击任何单元格时,您可以增加特定单元格的高度以显示所有详细信息,您可以按以下方式执行此操作:
- Initially all cells will have same height so in heightForRowAtIndexPath will return same height say 40.
- When user clicks on any cell, store that index path in some variable and call reloadData for tableView, which will call
heightForRowAtIndexPath, in this you check for selected cell index
path and return height say 100, which will display user info also.
希望这能满足您的要求。
关于iphone - 如何制作可扩展的 UITableViewCell,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/16301157/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) |
Powered by Discuz! X3.4 |