Called by UIKit to initiate automatic saving of documents with unsaved changes.
- iOS 5.0+
UIDocument periodically invokes this method to initiate a save operation if there are unsaved changes. You should not call this method directly. Subclasses can override it if they want to do special things with autosaving. The default implementation of this method invokes the
has method and, if that returns
true, it invokes the
This method should only be invoked for period-based saves. You may invoke it with the
success parameter of the completion-handler parameter set to
false and return; this makes it safe to not actually save when
autosave is invoked. However, if you call
save(to:, saving of document data must occur.