PTCoordinatedDocumentDelegate
@protocol PTCoordinatedDocumentDelegate <NSObject>
The methods declared by the PTCoordinatedDocumentDelegate protocol allow the adopting delegate
to respond to messages from the PTCoordinatedDocument class.
-
Notifies the conforming object that the coordinated document changed.
Declaration
Objective-C
- (void)coordinatedDocumentDidChange: (nonnull PTCoordinatedDocument *)coordinatedDocument;Swift
func coordinatedDocumentDidChange(_ coordinatedDocument: PTCoordinatedDocument)Parameters
coordinatedDocumentThe
PTCoordinatedDocumentthat changed. -
Notifies the conforming object that the coordinated document changed.
Declaration
Objective-C
- (void)coordinatedDocument:(nonnull PTCoordinatedDocument *)coordinatedDocument presentedItemDidMoveToURL:(nonnull NSURL *)newURL;Swift
func coordinatedDocument(_ coordinatedDocument: PTCoordinatedDocument, presentedItemDidMoveTo newURL: URL)Parameters
coordinatedDocumentThe
PTCoordinatedDocumentthat generated the event.newURLThe url that the item was moved/renamed to.
-
Used to control if the document will be saved.
Declaration
Objective-C
- (BOOL)coordinatedDocumentShouldSave: (nonnull PTCoordinatedDocument *)coordinatedDocument;Swift
func coordinatedDocumentShouldSave(_ coordinatedDocument: PTCoordinatedDocument) -> BoolParameters
coordinatedDocumentThe
PTCoordinatedDocumentthat generated the event.Return Value
YES to save; NO to not save.
-
Used to control if the document will be autosaved when such a save is triggered by iOS.
Declaration
Objective-C
- (BOOL)coordinatedDocumentShouldAutoSave: (nonnull PTCoordinatedDocument *)coordinatedDocument;Swift
func coordinatedDocumentShouldAutoSave(_ coordinatedDocument: PTCoordinatedDocument) -> BoolParameters
coordinatedDocumentThe
PTCoordinatedDocumentthat generated the event.Return Value
YES to save; NO to not save.
PTCoordinatedDocumentDelegate Protocol Reference