我有一个奇怪的问题,我正在使用EKEventEditViewController从我的应用程序中保存事件。 代码是
- (void)addEvent:(id)sender {
// When add button is pushed, create an EKEventEditViewController to display the event.
EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil];
// set the addController's event store to the current event store.
addController.eventStore = self.eventStore;
addController.event.title = self.reportTitle;
// present EventsAddViewController as a modal view controller
[self presentModalViewController:addController animated:YES];
addController.editViewDelegate = self;
[addController release];
}
问题是它在我的iOS 5 iphone中运行良好。但是当我使用iOS 4.1在iPhone 3GS中进行测试时,它会在iCal中存储错误的开始/结束日期和时间。任何人都可以指导我出错了吗。