【发布时间】:2016-03-20 19:01:44
【问题描述】:
在 EKEventEditViewController 实例上编辑事件并选择另一个日历时,事件上的日历确实会发生变化,但对标题等其他属性的更改会丢失。
如果我不选择其他日历,更改将按预期保留。
这是我加载编辑器时的代码
let editorVC = EKEventEditViewController()
eventKitEditorViewController = editorVC // eventKitEditorViewController is a class variable
editorVC.event = ekEvent // ekEvent is the supplied event to edit
editorVC.modalPresentationStyle = .Popover
editorVC.eventStore = OP1EventKitManager.sharedInstance.eventStore // the store is on a singleton object
editorVC.editViewDelegate = self
rootVC.presentViewController(editorVC, animated: true, completion: nil)
/// DELEGATE METHOD
func eventEditViewController(controller: EKEventEditViewController, didCompleteWithAction action: EKEventEditViewAction) {
print(action)
controller.dismissViewControllerAnimated(true, completion: nil)
}
当 eventEditViewController didCompleteWithAction 完成时,我需要做任何额外的事情吗?
【问题讨论】:
-
我遇到了同样的问题,解决方案是重新加载显示我的事件的表。当用户单击“完成”按钮时,EKEventEditViewController 会保存更改
标签: ios eventkit ekevent ekeventstore