PSPDFDocumentEditorToolbarController

Manages the document editor toolbar state and presents various document editing controllers. - note: This class requires the Document Editor component to be enabled for your license.

  • Shows or hides the new page view controller, depending on whether it is already visible. - parameter: sender A UIView or UIBarButtonItem used as the anchor view for the popover controller (iPad only). - parameter: options A dictionary of presentation options. See PSPDFPresentationActions.h for possible values.

    Declaration

    Objective-C

    - (nullable PSPDFNewPageViewController *)
    toggleNewPageController:(nullable id)sender
        presentationOptions:(nullable NSDictionary<NSString *, id> *)options;

    Swift

    func toggleNewPageController(_ sender: Any?, presentationOptions options: [String : Any]? = nil) -> PSPDFNewPageViewController?

    Parameters

    sender

    A UIView or UIBarButtonItem used as the anchor view for the popover controller (iPad only).

    options

    A dictionary of presentation options. See PSPDFPresentationActions.h for possible values.

  • Shows or hides an action sheet with save options (save, save as, and discard changes - depending on the document editor).

    An action sheet is used when sender is specified for context. There is no title or message set in that case. If no sender is specified, an alert with a title and message is used instead.

    Declaration

    Objective-C

    - (nullable UIAlertController *)
    toggleSaveActionSheet:(nullable id)sender
      presentationOptions:(nullable NSDictionary<NSString *, id> *)options
        completionHandler:(nullable void (^)(BOOL))completionHandler;

    Swift

    func toggleSaveActionSheet(_ sender: Any?, presentationOptions options: [String : Any]? = nil, completionHandler: ((Bool) -> Void)? = nil) -> Any!

    Parameters

    sender

    A UIView or UIBarButtonItem used as the anchor view for the popover controller (iPad only).

    options

    A dictionary of presentation options. See PSPDFPresentationActions.h for possible values.

    completionHandler

    A completion callback, called when saving completes. Might be called after the save controller completes if Save As… is selected. If cancelled is yes, the save flow was interrupted.

  • Shows or hides a view controller with saving options. - parameter: sender A UIView or UIBarButtonItem used as the anchor view for the popover controller (iPad only). - parameter: options A dictionary of presentation options. See PSPDFPresentationActions.h for possible values. - parameter: completionHandler A completion callback, called when saving completes. If cancelled is yes, the save flow was interrupted.

    Declaration

    Objective-C

    - (nullable PSPDFSaveViewController *)
    toggleSaveController:(nullable id)sender
     presentationOptions:(nullable NSDictionary<NSString *, id> *)options
       completionHandler:(nullable void (^)(BOOL))completionHandler;

    Swift

    func toggleSave(_ sender: Any?, presentationOptions options: [String : Any]? = nil, completionHandler: ((Bool) -> Void)? = nil) -> PSPDFSaveViewController?

    Parameters

    sender

    A UIView or UIBarButtonItem used as the anchor view for the popover controller (iPad only).

    options

    A dictionary of presentation options. See PSPDFPresentationActions.h for possible values.

    completionHandler

    A completion callback, called when saving completes. If cancelled is yes, the save flow was interrupted.