Today I began to create simple xcdatamodel with only 1 entity and few attributes in it. So when I created number attribute of type integer 16 in class definition of nsmanagedobject its type represented as NSNumber?
class JournalEntry : NSManagedObject {
@NSManaged var date: Date?
@NSManaged var height: String?
@NSManaged var period: String?
@NSManaged var wind: String?
@NSManaged var location: String?
@NSManaged var rating: NSNumber?
}
why not in int16? (I've read that objc doesn't have int? type) (because in model i allowed attribute to be optional) so if I won't assign value to NSNumber? property how it represented in objc during runtime? (it will be zero? p.s. I removed initial value as zero so there is no initial value)