gpt4 book ai didi

ios - 为什么 EKCalendarChooser 的 selectedCalendars 属性为空?

转载 作者:可可西里 更新时间:2023-11-01 03:28:14 27 4
gpt4 key购买 nike

我有一个 EKCalendarChoosere,它允许我选择日历。我看到日历和委托(delegate)方法 (EKCalendarChooserDelegate) 被调用。但是,当我访问日历选择器的选定日历属性时,它们始终为空。是否需要手动添加它们或选择器是否处理?提前致谢

最佳答案

如果您仍然对为什么 calendarChooserSelectionDidChange 方法为 selectedCalendars 返回 NULL 结果感兴趣。我遇到了同样的问题。

calendarChooserSelectionDidChange 委托(delegate)方法被调用时,如果EKCalendarChooser 使用 EKCalendarChooserSelectionStyleSingle 设置,一切正常。但是如果它是为 EKCalendarChooserSelectionStyleMultiple 设置的,calendarChooserSelectionDidChange 委托(delegate)方法会触发,但是 calendarChooser.selectedCalendars 将返回 NULL,除非您设置日历的 NSSet在设置 EKCalendarChooser 时,即: detailViewController.selectedCalendars = mySelectedCalendars;或 detailViewController.selectedCalendars = [NSSet setWithArray:[eventStore calendars]];

关于ios - 为什么 EKCalendarChooser 的 selectedCalendars 属性为空?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8313101/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com