【发布时间】:2023-04-07 02:17:01
【问题描述】:
我是 xcode 编程的新手,遇到了这个错误。我不确定新更新的 xcode 想让我在这里做什么,因为它在我升级之前就可以工作。
错误:
“FormBaseCell”类型的值没有成员。
我的代码:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let rowDescriptor = formRowDescriptorAtIndexPath(indexPath)
let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor)
let reuseIdentifier = NSStringFromClass(formBaseCellClass)
var cell: FormBaseCell? = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier) as? FormBaseCell
if cell == nil {
cell = formBaseCellClass.init(style: .Default, reuseIdentifier: reuseIdentifier)
cell?.tableViewController = self // <--error
cell?.configure()
}
【问题讨论】: