Answer the question
In order to leave comments, you need to log in
How to convert from NSSet to another type?
Plz tell me how to convert the NSSet value to another type in Core Data?
There is a "Category" model which has the following fields:
@NSManaged public var name: String?
@NSManaged public var words: NSSet?
@NSManaged public var name: String?
self.catergory.allWords.apend(word)
extension Category: CollectionCellViewModel {
var fullName: String {
set {
name = newValue
}
get {
return name ?? ""
}
}
var allWords: [Word] {
set {
words = newValue // Cannot assign value of type '[Word]' to type 'NSSet?'
}
get {
return words // // Cannot convert return expression of type 'NSSet?' to return type '[Word]'
}
}
}
Answer the question
In order to leave comments, you need to log in
I'm here for NSSet
, if you're there NSSet?
, then you know what to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question