Instance Method

accommodatePresentedItemDeletionWithCompletionHandler:

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

Declaration

- (void)accommodatePresentedItemDeletionWithCompletionHandler:(void (^)(NSError *errorOrNil))completionHandler;

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.

See Also

Handling Changes to Files

- savePresentedItemChangesWithCompletionHandler:

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

- presentedItemDidMoveToURL:

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

- presentedItemDidChange

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