The gold challenge in chapter 11 was to to push another view controller instance (a “DetailDATEViewController”) onto the navigation stack when the button ChangeDate is tapped in the DetailViewController. This new view controller should have a DatePicker instance to modify the dateCreated property of the selected BNRItem.
To “save” the selected date I added this to the viewWillDisappear: method in the DetailDATEViewController:
[item setDateCreated: changedDate];
This now throws an exception
because in BNRItem.h the types of some properties have changed;
dateCreated is now an NSTimeInterval instead of an NSDate.
So my question is:
How can I “save” the new date selected on the DatePicker (an NSDate) in an BNRItem (that only has an NSTimeInterval variable)?
Can an NSTimeInterval be converted into an NSDate? What would be the reference date?
Thanks for your answers!