开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜