PSPDFSaveViewControllerDelegate

@protocol PSPDFSaveViewControllerDelegate<NSObject>

/// Called when the save or cancel button is pressed. The delegate should save the document requested.
- (void)saveViewControllerDidEnd:(PSPDFSaveViewController *)controller shouldSave:(BOOL)shouldSave;

@optional

/// Allows the delegate to conditionally allow or prevent saving. Called after the save button is invoked.
/// If a NSError object is assigned to the `error` reference, than an alert is shown with the error's
/// `localizedDescription` as content.
- (BOOL)saveViewControllerShouldSave:(PSPDFSaveViewController *)controller toPath:(NSString *)path error:(NSError **)error;

@end

Undocumented

  • Called when the save or cancel button is pressed. The delegate should save the document requested.

    Declaration

    Objective-C

    - (void)saveViewControllerDidEnd:(nonnull PSPDFSaveViewController *)controller
                          shouldSave:(BOOL)shouldSave;

    Swift

    func saveViewControllerDidEnd(_ controller: PSPDFSaveViewController, shouldSave: Bool)
  • Allows the delegate to conditionally allow or prevent saving. Called after the save button is invoked. If a NSError object is assigned to the error reference, than an alert is shown with the error’s localizedDescription as content.

    Declaration

    Objective-C

    - (BOOL)saveViewControllerShouldSave:
                (nonnull PSPDFSaveViewController *)controller
                                  toPath:(nonnull NSString *)path
                                   error:(NSError *_Nullable *_Nullable)error;

    Swift

    optional func saveViewControllerShouldSave(_ controller: PSPDFSaveViewController, toPath path: String) throws