我想遍历我的 UITableView 中包含自定义类“tempCell”的单元格的单元格,但是,我收到错误消息type of expression is ambiguous without more context
。
let paths = tableView_sign_in.visibleCells()
for cell: tempCell in paths { // type of expression is ambiguous without more context
cell.textfield.enabled = false
}
最佳答案
你必须“如果让”customCell
for cell in tableView.visibleCell() {
if let customCell = cell as? TempCell {
customCell.textField.enabled = false
}
}
关于ios - 迭代 UITableView 中的自定义单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31550025/