gpt4 book ai didi

swift - 获取行和列中的单元格(Cocoa)

转载 作者:行者123 更新时间:2023-11-30 10:44:09 24 4
gpt4 key购买 nike

我需要在不使用表格 View 函数的情况下获取指定行的列中包含的单元格。例如:

for a in 0...tableview!.numberOfRows {
let column = tableview.tableColumns[2]
let cell = cell in column at the row a
}

你有什么解决办法吗?

编辑:在 cocoa 中

最佳答案

我用这个解决了(检索每个单元格中项目的值),谢谢 Willeke

for a in 0...tableview!.numberOfRows-1 {
let cell = tableview.view(atColumn: 2, row: a, makeIfNecessary: false) as? cella
print(cell?.tipo.title)
}

关于swift - 获取行和列中的单元格(Cocoa),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56151514/

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