我想自定义一个表格 View 单元格,因此我创建了一个如下所示的新文件,并执行了 https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson7.html 中提到的必要步骤
DetailTableViewCell.swift:
import UIKit
class DetailTableViewCell: UITableViewCell {
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var contentLabel: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
但是当我编写 var details =Detail() 时,它会报告 Use of unresolvedidentifier 'Detail'。
为什么?我只是按照教程进行操作。class CurrentViewController: UIViewController{
var details=[Detail]()
...
}
最佳答案
关于ios - Swift自定义表格 View 单元格未解析的标识符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36737186/