EKEvent Startdate无法在iOS 5.1.1中以编程方式设置

时间:2012-08-01 06:26:50

标签: ios ekevent

我正在尝试为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)

任何人都知道解决方案。让我知道。

提前致谢。

0 个答案:

没有答案