无法将类型为“NSFetchedResultsController”的返回表达式转换为返回类型“NSFetchedResultsController <nsfetchrequestresult>”

时间:2017-04-06 14:58:27

标签: swift xcode return

我正在尝试将一些代码从swift 2转换为swift 3,一切都很顺利,直到我得到这部分代码:

var fetchedResultsController: NSFetchedResultsController<NSFetchRequestResult>{
    if _fetchedResultsController != nil {
        return _fetchedResultsController!
    }

Xcode会出现错误:

    Cannot convert return expression of type 'NSFetchedResultsController' to return type
   'NSFetchedResultsController<NSFetchRequestResult>'

我对如何修复它感到有点难过

0 个答案:

没有答案