Instance Method

accommodatePresentedItemDeletion(completionHandler:)

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

Declaration

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

Parameters

completionHandler

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.

Discussion

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.