Reputation: 3058
I have an entity with an attribute value
of type "Double". Why, when I create an NSManagedObject subclass for this does it change to an NSNumber
?
@NSManaged var value: NSNumber
Thanks.
Upvotes: 1
Views: 314
Reputation: 6963
With new version of Xcode you no longer can store have types of Integer, Double, Bool when creating a NSManagedObject subclass
. They are all declared as NSNumber
You can convert them to double by calling doubleValue
function:
let myDouble = value.doubleValue
Upvotes: 1