Apollo
Apollo

Reputation: 9054

Saving creation date of a core data object

Currently I'm creating a custom List object using Core Data. An attribute of List is creationDate. However, when I set its Attribute Type to Date and then generate the object class files, it comes up as NSTimeInterval. Is this supposed to happen?

If so, could somebody please explain the best way to save the object's creation date?

Upvotes: 0

Views: 365

Answers (1)

Panos
Panos

Reputation: 991

When you generated the class files, you probablay checked the "Use scalar properties for primitive types" checkbox (it appears when you are asked to choose a folder). Uncheck it and Date attributes should become NSDates.enter image description here

Upvotes: 3

Related Questions