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
coordinatedDocument
The
PTCoordinatedDocument
that 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
coordinatedDocument
The
PTCoordinatedDocument
that generated the event.newURL
The 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) -> Bool
Parameters
coordinatedDocument
The
PTCoordinatedDocument
that 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) -> Bool
Parameters
coordinatedDocument
The
PTCoordinatedDocument
that generated the event.Return Value
YES to save; NO to not save.