savePresentedItemChanges(completionHandler:)
Tells your object to save any unsaved changes for the presented item.
Declaration
optional func savePresentedItemChanges(completionHandler: @escaping @Sendable ((any Error)?) -> Void)optional func savePresentedItemChanges() async throwsParameters
- completionHandler:
The TP40008195 CH3 to call after you save your changes. If you saved your changes successfully, pass
nilfor the block’serrorOrNilparameter; otherwise, pass an error object indicating why the changes could not be saved.
Discussion
The file coordinator calls this method to ensure that all objects trying to access the file or directory see the same contents. Implement this method if your object can change the presented item in a way that requires you to write those changes back to disk. If your presenter object does not make changes that need to be saved, you do not need to implement this method.