1
EKEventEditViewControllerのインスタンスでイベントを編集して別のカレンダーを選択すると、イベントのカレンダーは変更されますが、タイトルなどの他の属性の変更は失われます。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は、ユーザーが「完了」ボタンをクリックしたときに変更を保存します – jessi