子类NsfetchedResultScontroller

发布于 2025-02-08 16:43:15 字数 719 浏览 0 评论 0原文

我正在尝试使用此RichfetchedResultScontroller,这是nsfetchedResultScontroller的子类博客文章。在使用此子类之前,我的代码库大量使用对象(at:)

现在我有Xcode给我这些错误:

类型“ nsfetchrequestresult'的价值没有成员'RelationsentityProperty'

我像这样编写的代码

let randomEntity = fetchedResultsController.object(at: indexPath).relationshipEntity

,因此这些是错误所显示的。

我试图在richfetchedResultScontroller的子类中做到这一点noreferrer“>在这里这无济于事:

public override func object(at indexPath: IndexPath) -> NSFetchRequestResult {
    super.object(at: indexPath)
}

有什么想法吗?

I'm trying to use this RichFetchedResultsController, a subclass of NSFetchedResultsController from this blog post. Prior to using this subclass, my codebase have a heavy use of object(at:).

Now I have Xcode giving me these errors:

value of type 'NSFetchRequestResult' has no member 'RelationshipEntityProperty'

I have code written like this

let randomEntity = fetchedResultsController.object(at: indexPath).relationshipEntity

So these are where the errors are showing.

I tried to do this in the subclass of RichFetchedResultsController taken from here and it didn't help:

public override func object(at indexPath: IndexPath) -> NSFetchRequestResult {
    super.object(at: indexPath)
}

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文