问题描述
我正在尝试在ios日历中创建具有当前时区的事件,但不能在给定的时间保存该事件。
2020-11-02 13:00:00 +0000 //开始日期和时间
2020-11-02 14:00:00 +0000 //结束日期和时间
//事件创建
let newEvent:EKEvent = EKEvent(eventStore: self.eventStore)
newEvent.title = self.eventTitleString
newEvent.calendar = eyeNakCalendar!
newEvent.location = self.addressstring
newEvent.startDate = calStartDate
newEvent.endDate = calEndDate
newEvent.isAllDay = false
do {
try self.eventStore.save(newEvent,span: .thisEvent)
}catch {
print("error")
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)