PTCoordinatedDocument


@interface PTCoordinatedDocument : UIDocument

A UIDocument subclass backed by a PTPDFDoc object.

To instantiate a new PTCoordinatedDocument, use initWithFileURL:.

  • The underlying PDF document. This property will be nil until the UIDocument is loaded.

    This property should not generally be set, except when the document may have been modified by out outside process, and needs to be reloaded.

    To instantiate a new PTCoordinatedDocument, use initWithFileURL:.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) PTPDFDoc *pdfDoc;

    Swift

    var pdfDoc: PTPDFDoc? { get set }
  • The last error that this document experienced.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSError *error;

    Swift

    var error: Error? { get set }
  • The delegate of the PTCoordinatedDocument object.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTCoordinatedDocumentDelegate> delegate;

    Swift

    weak var delegate: PTCoordinatedDocumentDelegate? { get set }
  • The save flag(s) that will be used if the system triggers a save. Default is e_ptincremental.

    Declaration

    Objective-C

    @property (nonatomic) PTSaveOptions defaultSaveFlags;

    Swift

    var defaultSaveFlags: PTSaveOptions { get set }
  • Undocumented

    Declaration

    Objective-C

    - (void)saveToURL:(NSURL *)url withSaveOptions:(PTSaveOptions)saveOptions forSaveOperation:(UIDocumentSaveOperation)saveOperation completionHandler:(void (^ __nullable)(BOOL success))completionHandler;

    Swift

    func save(to url: URL, with saveOptions: PTSaveOptions, for saveOperation: UIDocument.SaveOperation) async -> Bool