Ehs*_*san 3 xcode core-data swift swiftui
How do I use @FetchRequest with a CoreData entity Post that has Codegen: Class Def. set in Xcode? So I don't create the Post" entity class manually, but let Xcode generate it?
I now get a
Use of undeclared type
Post
as an error on the last line.
@FetchRequest(entity: Post.entity(), sortDescriptors: [
NSSortDescriptor(keyPath: \Post.date, ascending: true)
])
var posts: FetchedResults<Post> // Use of undeclared type ´Post´
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
517 次 |
| 最近记录: |