UIDatePicker Not storing time in core data
I am using a UIDatepicker with only "Time", I save the time in a NSDate object type, however when I try to store the Object in core data I get an error saying its 开发者_StackOverflownot a NSDate type...
tt = [pickerTime date];
[myObject setValue:tt forKey:@"time"];
Thanks,
Hey, a see a mistake here:
tt = [pickerTime date];
tt's type is either an NSDate, or... You have to declare what tt is:
NSDate *tt = [pickerTime date];
Make sure that your using a date field in IB.
精彩评论