Asynchronously closes the document after saving any changes.
- iOS 5.0+
A block with code to execute after the save-and-close operation concludes. The block returns no value and has one parameter:
trueif any save operation succeeds, otherwise
The block is invoked on the main queue.
You call this method to begin the sequence of method calls that saves a document safely and asynchronously. The file-system location of the document derives from the
file property. After the save operation concludes, the code in
completion is executed. In this code, you can close the document—for example, by removing the document’s view from the screen. Additionally, if the save operation did not succeed (
false), you can respond in an appropriate manner.
You typically would not override this method. The default implementation calls the