Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用以下方法访问新提醒的默认日历:
EKCalendar.defaultCalendarForNewReminders()
这个函数应该返回一个可选的 EKCalendar(文档页面)
但是像上面这样调用它会导致标题中提到的错误消息(它不是 EKCalendar 的成员)。
我错过了什么?
发现了,文档很烦人。他们说这是 EKCalendar 上的实例方法,但实际上它在 EKEventStore 上。所以正确的是:
EKEventStore().defaultCalendarForNewReminders()