Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 1
@objc(Article)
// 2
final class Article: NSManagedObject {
// 3
@NSManaged var title: String
@NSManaged var content: String
}
extension Article {
// 4
@nonobjc class func fetchRequest() -> NSFetchRequest<Article> {
return NSFetchRequest<Article>(entityName: "Article")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment