Swift NSException-nib但没有';我看不到一个合适的视角
Im有问题,嵌入在容器TableViewController中: 错误: 异常NSException*“-[UITableViewController loadView]加载了“PhO Au gvD view DUC HK jFo”nib,但未获取UITableView。0x0000000281a64900 我读书了,但仍然不知道该怎么办Swift NSException-nib但没有';我看不到一个合适的视角,swift,xcode,Swift,Xcode,Im有问题,嵌入在容器TableViewController中: 错误: 异常NSException*“-[UITableViewController loadView]加载了“PhO Au gvD view DUC HK jFo”nib,但未获取UITableView。0x0000000281a64900 我读书了,但仍然不知道该怎么办 class ViewControllerSettings: UIViewController, UITableViewDelegate, UITableV
class ViewControllerSettings: UIViewController, UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
var cell : UITableViewCell? = tableView.dequeueReusableCell(withIdentifier: "cell")
if cell == nil {
cell = UITableViewCell(style: UITableViewCell.CellStyle.default, reuseIdentifier: "cell")
}
return cell!
}
同样的错误:
异常NSException*“[setValue:forUndefinedKey:]:此类不符合key staticDataSource的键值编码。”0x00000002807fda10