无法将类型为“Class <t>”的值分配为'protocol <uiimagepickercontrollerdelegate,uinavigationcontrollerdelegate =“”>?'

时间:2015-12-27 03:17:05

标签: ios swift2

我希望有人之前碰到过这个。我正在尝试将此类指定为UIImagePickerController的委托,我收到此错误:

“PictureViewController.swift:40:32:无法指定'PictureViewController'类型的值来输入'protocol?'”

有什么想法吗?提前谢谢。

function setupSchema() {
    Object.keys(schema).forEach(function (table) {
        console.log("Checking for table: " + table) ;
        // FIXME: Why does this always seem to pass clicks as tablename?!
        dbClient.query(
           "show tables LIKE '" + table + "'",
           function (err, results, fields) {
               createOnEmpty(err, results, fields, table, schema[table])
           }
        );
    });
}

}

1 个答案:

答案 0 :(得分:2)

其实我弄清楚了。我只需要声明这个类实现了UINavigationControllerDelegate,现在一切正常。