iPhone 上的日历应用程序

发布于 2024-11-24 05:19:10 字数 377 浏览 4 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人如玉 2024-12-01 05:19:41

您似乎正在使用日历存储框架,该框架在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文