无法使用EKEvent编辑或删除重复

问题描述

没有任何问题,我能够将重复发生添加到我的事件中。但是,我在编辑或删除活动中的重复发生一些问题。如何编辑或删除活动中的重复发生?

当我第一次创建重复活动时,我一点都没有问题,如下所示:

eventStore.addRecurrenceRule(EKRecurrenceRule(recurrenceWith: .daily,interval: 1,daysOfTheWeek: nil,daysOfTheMonth: nil,monthsOfTheyear: nil,weeksOfTheyear: nil,daysOfTheyear: nil,setPositions: nil,end: nil))

即使我创建了一个具有重复发生的新事件,也很好,当我尝试更新重复发生时,重复发生的执行效果也很奇怪,因为在我更新之后,它会异常运行。我试图在iOS日历和Mac上编辑重复事件,但是重复事件将我拒之门外。我不得不删除整个事件并创建一个新事件。

但是,当事件已经重复出现时,我可以对其进行编辑或删除时,此操作将无效:

func clearCalendarEvent(clearStore: EKEvent) {
    // METHOD 1
    clearStore.recurrenceRules?.removeAll()

    // METHOD 2
    clearStore.recurrenceRules = nil

    // METHOD 3
    clearStore.removeRecurrenceRule(EKRecurrenceRule())
}

我该怎么解决?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)