我正在尝试为 EKEvent startdate 属性分配日期,如下所示,代码为:
My CustomEKEvent.h file
@interface CustomEKEvent : EKEvent<NSCoding>
{
}
My CustomEKEvent.m file
-(id)initWithEvent:(EKEvent*)event
{
self.startDate = event.startDate; // Whats wrong in this code? but its working fine in iOS 4.3
}
输出是:
event.startDate :2012-07-25 06:30:00 +0000
self.startDate :(null)
任何人都知道解决方案。让我知道。
提前致谢。