Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift NSException-nib但没有';我看不到一个合适的视角_Swift_Xcode - Fatal编程技术网

Swift NSException-nib但没有';我看不到一个合适的视角

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

Im有问题,嵌入在容器TableViewController中:

错误: 异常NSException*“-[UITableViewController loadView]加载了“PhO Au gvD view DUC HK jFo”nib,但未获取UITableView。0x0000000281a64900

我读书了,但仍然不知道该怎么办

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