Reputation:
This is my code import Foundation import CoreData
public class SpaceItem: NSManagedObject, Identifiable {
@NSManaged public var name:String?
@NSManaged public override var describe: String?
@NSManaged public override var imagename: String?
}
and Xcode is giving the error "Property does not override any property from its superclass in swift5" could any one help me?
Upvotes: 1
Views: 1294
Reputation: 15248
Remove keyword override
from describe
and imagename
properties and satisfy Identifiable
protocol
requirement as,
public class SpaceItem: NSManagedObject, Identifiable {
var id: String
@NSManaged public var name:String?
@NSManaged public var describe: String?
@NSManaged public var imagename: String?
}
Upvotes: 2