PSPDFImagePickerControllerDelegate

@protocol PSPDFImagePickerControllerDelegate <NSObject>

Delegate informing about image selection and editing in PSPDFImagePickerController.

  • Called when the image picker selected an image from the photo library or when an image from the camera has been taken. Dimensions of the image are derived from the original image, without modifications.

    Declaration

    Objective-C

    - (void)imagePickerController:(nonnull PSPDFImagePickerController *)picker
                   didSelectImage:(nonnull UIImage *)image;

    Swift

    optional func imagePickerController(_ picker: PSPDFImagePickerController, didSelect image: NSImage)
  • Called when the image picker did finish selecting an image or, if shouldShowImageEditor enabled, when the image editor finished. Dimensions of the image are derived from the original image, without modifications, if shouldShowImageEditor is disabled The cropped image dimensions from the image editor are used, if shouldShowImageEditor is enabled. Images may be post processed to use a smaller size, depending on shouldShowQualitySheet and allowedImageQualities.

    Declaration

    Objective-C

    - (void)imagePickerController:(nonnull PSPDFImagePickerController *)picker
               didFinishWithImage:(nonnull UIImage *)image
                          andInfo:(nonnull NSDictionary<NSString *, id> *)info;

    Swift

    optional func imagePickerController(_ picker: PSPDFImagePickerController, didFinishWith image: NSImage, andInfo info: [String : Any])

    Parameters

    info

    The image info of the original image, selecting from the image picker.

  • Called when the image picker or the image editor cancelled without selecting an image.

    Note

    If you implement this method, you are responsile for dismissing the image picker. Otherwise it will be dismissed automatically.

    Declaration

    Objective-C

    - (void)imagePickerControllerCancelled:
        (nonnull PSPDFImagePickerController *)picker;

    Swift

    optional func imagePickerControllerCancelled(_ picker: PSPDFImagePickerController)