Contents

accommodatePresentedItemDeletion(completionHandler:)

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

Declaration

optional func accommodatePresentedItemDeletion(completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
optional func accommodatePresentedItemDeletion() async throws

Parameters

  • completionHandler:

    The TP40008195 CH3 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.

See Also

Handling Changes to Files