PSPDFDocumentSharingCoordinator


@interface PSPDFDocumentSharingCoordinator
    : NSObject <PSPDFDocumentSharingViewControllerDelegate>

A document sharing coordinator represents a document action. This is an abstract class - see concrete implementations such as PSPDFMailCoordinator, PSPDFPrintCoordinator or PSPDFExportCoordinator.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFDocumentSharingCoordinator
        : NSObject <PSPDFDocumentSharingViewControllerDelegate>
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFDocumentSharingCoordinator
        : NSObject <PSPDFDocumentSharingViewControllerDelegate>
  • Initialize with the documents.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocuments:
        (nonnull NSArray<PSPDFDocument *> *)documents;

    Swift

    init(documents: [PSPDFDocument])
  • Initialize with a document.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocument:(nonnull PSPDFDocument *)document;

    Swift

    convenience init(document: PSPDFDocument)
  • The documents this coordinator operates on.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<PSPDFDocument *> *_Nonnull documents;

    Swift

    var documents: [PSPDFDocument] { get }
  • Pages that should be offered for the sharing.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSOrderedSet<NSNumber *> *visiblePageIndexes;

    Swift

    @NSCopying var visiblePageIndexes: NSOrderedSet? { get set }
  • Attached delegate.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<PSPDFDocumentSharingCoordinatorDelegate> _Nullable delegate;

    Swift

    weak var delegate: PSPDFDocumentSharingCoordinatorDelegate? { get set }
  • Defines what sharing options should be displayed.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        PSPDFDocumentSharingOptions sharingOptions;

    Swift

    var sharingOptions: PSPDFDocumentSharingOptions { get set }
  • Allows to check if the action can be performed.

    Declaration

    Objective-C

    @property (readonly, getter=isAvailable, nonatomic) BOOL available;

    Swift

    var isAvailable: Bool { get }
  • Indicates that a background operation is running.

    Declaration

    Objective-C

    @property (readonly, getter=isExecuting, atomic) BOOL executing;

    Swift

    var isExecuting: Bool { get }
  • Presents the view controller to targetController. - note: Might work on a background thread to crunch the document before presenting the final view controller.

    Declaration

    Objective-C

    - (void)presentToViewController:
                (nullable UIViewController<PSPDFPresentationActions> *)
                    targetController
                            options:(nullable NSDictionary<NSString *, id> *)options
                             sender:(nullable id)sender
                           animated:(BOOL)animated
                         completion:(nullable void (^)(void))completion;

    Swift

    func present(to targetController: UIViewController?, options: [String : Any]? = nil, sender: Any?, animated: Bool, completion: (() -> Void)? = nil)
  • Title and action button are different for each subclass.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull title;

    Swift

    var title: String { get }
  • Title for the commit button.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull commitButtonTitle;

    Swift

    var commitButtonTitle: String { get }
  • Policy event. Specified in PSPDFApplicationPolicy.h.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull policyEvent;

    Swift

    var policyEvent: String { get }
  • Subclass hook to add custom checks.

    Declaration

    Objective-C

    - (BOOL)isAvailableUserInvoked:(BOOL)userInvoked
                             error:(NSError *_Nullable *_Nullable)error;

    Swift

    func isAvailableUserInvoked(_ userInvoked: Bool) throws
  • Hook to customize the sharing controller.

    Declaration

    Objective-C

    - (BOOL)configureSharingController:
        (nonnull PSPDFDocumentSharingViewController *)sharingController;

    Swift

    func configureSharing(_ sharingController: PSPDFDocumentSharingViewController) -> Bool
  • Sharing view controller, available when presented.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentSharingViewController *_Nullable sharingController;

    Swift

    weak var sharingController: PSPDFDocumentSharingViewController? { get }
  • Present action controller. When overwritten, please call documentSharingCoordinator:didFinishWithError: when done.

    Declaration

    Objective-C

    - (void)
    showActionControllerToViewController:
        (nonnull UIViewController<PSPDFPresentationActions> *)targetController
                                  sender:(nonnull id)sender
                             sendOptions:(PSPDFDocumentSharingOptions)sendOptions
                                   files:(nonnull NSArray<PSPDFFile *> *)files
                       annotationSummary:
                           (nullable NSAttributedString *)annotationSummary
                                animated:(BOOL)animated;

    Swift

    func showActionController(to targetController: UIViewController, sender: Any, send sendOptions: PSPDFDocumentSharingOptions = [], files: [PSPDFFile], annotationSummary: NSAttributedString?, animated: Bool)