I set NSTimeInterval using setValueForKey in a subclass of NSManagedObject, the value is set correctly, and also true when it is retrieved using valueForKey, however, if the accessor is used directly, it returns an invalid value. Here is sample code that demonstrates the problem
let date = NSDate()
self.setValueForKey(date, "dateLastSynced")
self.valueForKey("dateLastSynced")
self.dateLastSynced
Oddly enough, if dateLastSynced is converted to NSDate, everything works fine.
Any ideas on what's going on?
source
share