gpt4 book ai didi

ios - 如何在 Swift 中的 UITableViewCell 之间插入一个新单元格

转载 作者:行者123 更新时间:2023-11-28 06:17:44 25 4
gpt4 key购买 nike

当从 UICollectionView 中选择一个单元格时,如何在 UITableViewCell 之间插入一个新单元格?这是它的样子:

我正在尝试创建一个家谱(血统表)。选择 parent 时,它显示了一个细节和 child 。如何做到这一点?谢谢!

最佳答案

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
(...)
tableView.insertRows(at: [IndexPaths], with: .top)
}

关于ios - 如何在 Swift 中的 UITableViewCell 之间插入一个新单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44673727/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com