iPhone 上的日历应用程序
NSPredicate *eventsForThisYear = [NSPredicate eventPredicateWithStartDate:startDate endDate:endDate calendars:[[CalCalendarStore defaultCalendarStore] calendars]];
NSArray *events = [eventDB eventsMatchingPredicate:eventsForThisYear];
在下面的代码中,我收到一条错误消息,指出“CalCalendarStore”未声明(在此函数中首次使用) 在 Xcode 4.2 中。我没有找到任何 CalCalendarStore
框架。
NSPredicate *eventsForThisYear = [NSPredicate eventPredicateWithStartDate:startDate endDate:endDate calendars:[[CalCalendarStore defaultCalendarStore] calendars]];
NSArray *events = [eventDB eventsMatchingPredicate:eventsForThisYear];
In the following code I got an error saying 'CalCalendarStore' is undeclared (first use in this function)
In xcode 4.2. I did not find any CalCalendarStore
Framework.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎正在使用日历存储框架,该框架在iOS上不可用。在 iOS 中,您需要使用
EventKit
。这里
是一个教程。网上还有很多其他内容。You seem to be using Calendar Store framework which is unavailable on iOS. In iOS, you need to use
EventKit
.Here
's a tutorial. There are many others available online.