GSKScannerUIConfiguration

@interface GSKScannerUIConfiguration : NSObject

Enables configuration of the GSKUIScanner scan flow.

Set the desired configuration on an instance of GSKScannerUIConfiguration and pass it to the initializer of GSKUIScanner to build the desired scan flow.

  • Specifies the source for the scanned documents (eg. the camera, …).

    If source is GSKScannerUISourceImageURL, you must provide the sourceImageURL parameter.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScannerUISource source;

    Swift

    var source: GSKScannerUISource { get set }
  • The image URL if source is GSKScannerUISourceImageURL.

    Declaration

    Objective-C

    @property (nonatomic, strong, readwrite) NSURL *_Nonnull sourceImageURL;

    Swift

    var sourceImageURL: URL { get set }
  • Multipage mode. Only apply when the source is GSKScannerUISourceCamera.

    When the multipage mode is active, the user will have the opportunity to snap multiple scans in a row and the output document will contain all these pages.

    When multipage mode is off, the user will only scan a single page. The output document will always contain a single page.

    Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL multiPage;

    Swift

    var multiPage: Bool { get set }
  • Force the use of a specific post processing.

    Defaults to GSKFilterAutomatic.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScannerUIFilterType defaultFilter;

    Swift

    var defaultFilter: GSKScannerUIFilterType { get set }
  • Select which actions are displayed in the post processing screen

    Default is everything.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScannerUIPostProcessingActions postProcessingActions;

    Swift

    var postProcessingActions: GSKScannerUIPostProcessingActions { get set }
  • Determines the size of the pages when generating the PDF.

    Default is GSKScannerUIPDFPageFit

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScannerUIPDFPageSize pdfPageSize;

    Swift

    var pdfPageSize: GSKScannerUIPDFPageSize { get set }
  • Determines the visibility of the flash button

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        BOOL flashButtonHidden;

    Swift

    var flashButtonHidden: Bool { get set }
  • Determines the default flash mode.

    Combine with flashButtonHidden if you want to only allow a specific flash mode.

    Defaults to GSKScannerUIFlashModeAuto

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        GSKScannerUIFlashMode defaultFlashMode;

    Swift

    var defaultFlashMode: GSKScannerUIFlashMode { get set }
  • UI background color.

    Default is black.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull backgroundColor;

    Swift

    @NSCopying var backgroundColor: UIColor { get set }
  • UI foreground color (text and icons)

    Default is white.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull foregroundColor;

    Swift

    @NSCopying var foregroundColor: UIColor { get set }
  • UI highlight color (document detection overlay)

    Default is dark blue.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull highlightColor;

    Swift

    @NSCopying var highlightColor: UIColor { get set }
  • UI menu color

    Default is system’s default (eg. blue on iOS)

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) UIColor *_Nonnull menuColor;

    Swift

    @NSCopying var menuColor: UIColor { get set }
  • JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality.

    Default is 60

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        NSInteger jpegQuality;

    Swift

    var jpegQuality: Int { get set }
  • Max scan dimension in pixels when generating the PDF file. All scans included in the PDF file will be scaled so that both their height and width are smaller than this value, while keeping their aspect ratio.

    Default is 0, which means no scaling is applied.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        NSInteger pdfMaxScanDimension;

    Swift

    var pdfMaxScanDimension: Int { get set }