Instance Method


Tells your object that its presented item is about to be deleted.


optional func accommodatePresentedItemDeletion(completionHandler: @escaping (Error?) -> Void)



The Block object to call after updating your data structures. Pass nil to the block’s errorOrNil parameter if you were able to successfully prepare for the deletion of the item. Pass an error object if your object could not prepare itself properly.


A file coordinator calls this method when your object’s presented item is about to be deleted. You can use this method to perform any actions that are needed to prepare for the deletion. For example, document objects typically use this method to close the document.

See Also

Handling Changes to Files

func savePresentedItemChanges(completionHandler: (Error?) -> Void)

Tells your object to save any unsaved changes for the presented item.

func presentedItemDidMove(to: URL)

Tells your object that the presented item moved or was renamed.

func presentedItemDidChange()

Tells your object that the presented item’s contents or attributes changed.