PSPDFImagePickerController


@interface PSPDFImagePickerController : UIImagePickerController

Subclass of UIImagePickerController used in PSPDFKit when showing the image picker, like when adding an image annotation or when adding a new page to a document from an image.

Allows to subclass the image picker controller, for example if you need to block portrait: https://stackoverflow.com/questions/11467361/taking-a-photo-in-an-ios-landscape-only-app

Shows a custom image editor after an image has been selected if shouldShowImageEditor is enabled.

@note delegate is set to self. Don’t change this, as this will restrict presenting the image editor. imageDelegate will be set when the picker is called from within PSPDFKit logic. You can override the delegate as long as you correctly forward calls to the original target.

  • Set this, to be informed about the selected and, if shouldShowImageEditor is enabled, the edited image. Ensure to relay calls to the existing delegate, if one is set.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<PSPDFImagePickerControllerDelegate> _Nullable imageDelegate;

    Swift

    weak var imageDelegate: PSPDFImagePickerControllerDelegate? { get set }
  • Controls showing the image editor after image selection. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL shouldShowImageEditor;

    Swift

    var shouldShowImageEditor: Bool { get set }
  • Allows to customize the offered image qualities. Defaults to PSPDFImageQualityHigh. Set to PSPDFImageQualityAll to enable the quality sheet.

    If there is only one option set or the image is not large enough to offer scaling, no quality sheet will be displayed.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PSPDFImageQuality allowedImageQualities;

    Swift

    var allowedImageQualities: PSPDFImageQuality { get set }
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFImagePickerController : UIImagePickerController