DocCore

Além de poder usar o SDK em sua forma padrão de exibição, o SDK permite também, que as telas sejam customizadas e para tal, no DocCoreCustomizationBuilder você terá acesso a todos os métodos de customização:

1. Tela de instruções

IdentificadorMétodos
(1) Back buttonsetBackButtonIcon(_:)
setBackButtonColor(forContent:background:border:)
(2) BackgroundsetBackgroundColor(_:)
(3) Context imagesetContextImage(_:)
(4) Bottom sheetsetBottomSheetColor(_:)
setBottomSheetCornerRadius(_:)
(5) TitlesetTitleText(_:color:font:)
(6) CaptionsetCaptionText(_:color:font:)
(7) First instructionsetFirstInstructionIcon(_:)
setFirstInstructionIconColor(forContent:background:border:)
setFirstInstructionTitleText(_:color:font:)
(8) Second instructionsetSecondInstructionIcon(_:)
setSecondInstructionIconColor(forContent:background:border:)
setSecondInstructionTitleText(_:color:font:)
(9) Continue buttonsetContinueButtonText(_:font:)
setContinueButtonColor(forContent:background:border:)

Código de exemplo

DocCoreCustomizationBuilder.builder()
    .customizeInstructionScreen { instructionBuilder in
        instructionBuilder
            .setBackButtonIcon(UIImage(named: "back-icon")!)
            .setBackButtonColor(
                forContent: UIColor.red,
                background: UIColor.green,
                border: UIColor.white
            )
            .setBackgroundColor(UIColor.purple)
            .setContextImage(UIImage(named: "context-image")!)
            .setBottomSheetColor(UIColor.cyan)
            .setBottomSheetCornerRadius(CGFloat(10))
            .setTitleText(
                "title-text",
                color: UIColor.brown,
                font: UIFont.systemFont(ofSize: 40)
            )
            .setCaptionText(
                "caption-text",
                color: UIColor.systemPink,
                font: UIFont.systemFont(ofSize: 30)
            )
            .setFirstInstructionIcon(UIImage(named: "first-instruction-icon")!)
            .setFirstInstructionIconColor(
                forContent: UIColor.purple,
                background: UIColor.green,
                border: UIColor.red
            )
            .setFirstInstructionTitleText(
                "fist-intruction-text",
                color: UIColor.darkGray,
                font: UIFont.systemFont(ofSize: 30)
            )
            .setSecondInstructionIcon(UIImage(named: "second-instruction-icon")!)
            .setSecondInstructionIconColor(
                forContent: UIColor.white,
                background: UIColor.orange,
                border: UIColor.black
            )
            .setSecondInstructionTitleText(
                "second-intruction-text",
                color: UIColor.magenta,
                font: UIFont.systemFont(ofSize: 24)
            )
            .setContinueButtonText(
                "continue-button-text",
                font: UIFont.systemFont(ofSize: 50)
            )
            .setContinueButtonColor(
                forContent: UIColor.lightGray,
                background: UIColor.systemPink,
                border: UIColor.white
            )
    }

2. Tela de captura de documento

IdentificadorMétodos
(1) Back buttonsetBackButtonIcon(_:)
setBackButtonColor(forContent:background:border:)
(2) Close buttonsetCloseButtonIcon(_:)
setCloseButtonColor(forContent:background:border:)
(3) Front indicatorsetFrontIndicatorText(_:)
setFrontIndicatorColor(_:)
setFrontIndicatorFocusedState(withImage:textColor:textFont:)
setFrontIndicatorUnfocusedState(withImage:textColor:textFont:)
(4) Back indicatorsetBackIndicatorText(_:)
setBackIndicatorColor(_:)
setBackIndicatorFocusedState(withImage:textColor:textFont:)
setBackIndicatorUnfocusedState(withImage:textColor:textFont:)
(5) Instruction textsetInstructionGuideText(forFront:back:confirmation:)
setInstructionGuideTextColor(_:)
setInstructionGuideTextFont(_:)
(6) PreviewsetCapturePreviewBorderColor(forCaptured:uncapturedState:)
(7) BackgroundsetBackgroundColor(_:)
(8) Capture buttonsetCaptureButtonIcon(_:)
setCaptureButtonColor(forContent:background:border:)
(9) Bottom sheetsetBottomSheetColor(_:)
setBottomSheetCornerRadius(_:)
(10) Confirmation messagesetConfirmationMessage(withText:color:font:)
(11) Retry buttonsetRetryButtonText(_:font:)
setRetryButtonColor(forContent:background:border:)
(12) Confirm buttonsetConfirmButtonText(_:forConfirmationText:font:)
setConfirmButtonColor(forContent:background:border:)

Código de exemplo

DocCoreCustomizationBuilder.builder()
    .customizeCaptureScreen { captureBuilder in
        captureBuilder
            .setBackButtonIcon(UIImage(named: "back-icon")!)
            .setBackButtonColor(
                forContent: UIColor.white,
                background: UIColor.magenta,
                border: UIColor.green
            )
            .setCloseButtonIcon(UIImage(named: "close-icon")!)
            .setCloseButtonColor(
                forContent: UIColor.magenta,
                background: UIColor.green,
                border: UIColor.white
            )
            .setFrontIndicatorText("Front")
            .setFrontIndicatorColor(UIColor.blue)
            .setFrontIndicatorFocusedState(
                withImage: UIImage(named: "focused-front-icon"),
                textColor: UIColor.purple,
                textFont: UIFont.systemFont(ofSize: 20)
            )
            .setFrontIndicatorUnfocusedState(
                withImage: UIImage(named: "unfocused-front-icon"),
                textColor: UIColor.lightGray,
                textFont: UIFont.systemFont(ofSize: 20)
            )
            .setBackIndicatorText("Back")
            .setBackIndicatorColor(UIColor.darkGray)
            .setBackIndicatorFocusedState(
                withImage: UIImage(named: "focused-back-icon"),
                textColor: UIColor.cyan,
                textFont: UIFont.systemFont(ofSize: 20)
            )
            .setBackIndicatorUnfocusedState(
                withImage: UIImage(named: "unfocused-back-icon"),
                textColor: UIColor.black,
                textFont: UIFont.systemFont(ofSize: 20)
            )
            .setInstructionGuideText(
                forFront: "front-text",
                back: "back-text",
                confirmation: "confirmation-text"
            )
            .setInstructionGuideTextColor(UIColor.blue)
            .setInstructionGuideTextFont(UIFont.systemFont(ofSize: 22))
            .setCapturePreviewBorderColor(
                forCaptured: UIColor.green,
                uncapturedState: UIColor.blue
            )
            .setBackgroundColor(UIColor.red)
            .setCaptureButtonIcon(UIImage(named: "capture-icon")!)
            .setCaptureButtonColor(
                forContent: UIColor.systemPink,
                background: UIColor.orange,
                border: UIColor.black
            )
            .setBottomSheetColor(UIColor.brown)
            .setBottomSheetCornerRadius(CGFloat(15))
            .setConfirmationMessage(
                withText: "confirmation-message",
                color: UIColor.white,
                font: UIFont.systemFont(ofSize: 24)
            )
            .setRetryButtonText("retry-button-text", font: UIFont.systemFont(ofSize: 30))
            .setRetryButtonColor(
                forContent: UIColor.orange,
                background: UIColor.black,
                border: UIColor.systemPink
            )
            .setConfirmButtonText(
                "confirm-button-text",
                forConfirmationText: "confirm-button-confirmation-text",
                font: UIFont.systemFont(ofSize: 30)
            )
            .setConfirmButtonColor(
                forContent: UIColor.red,
                background: UIColor.magenta,
                border: UIColor.cyan
            )
    }

3. Tela de loading

IdentificadorMétodos
(1) BackgroundsetBackgroundColor(_:)
(2) LoadingsetLoading(withColor:width:scaleFactor:)

Código de exemplo do Builder

DocCoreCustomizationBuilder.builder()
    .customizeLoadingScreen { loadingBuilder in
        loadingBuilder
            .setBackgroundColor(UIColor.orange)
            .setLoading(
                withColor: UIColor.cyan,
                width: CGFloat(20),
                scaleFactor: Int(8)
            )
    }

4. Tela de resultado

IdentificadorMétodos
(1) SuccesssetSuccessBackgroundColor(_:)
setSuccesImage(_:)
setSuccessMessage(_:,color:font:)
(2) ErrorsetErrorBackgroundColor(_:)
setErrorImage(_:)
setErrorMessage(_:color:font:)
(3) RetrysetRetryBackgroundColor(_:)
setRetryImage(_:)
setRetryMessage(_:color:font:)
setRetryButtonText(_:font:)
setRetryButtonColor(forContent:background:border:)

Código de exemplo

DocCoreCustomizationBuilder.builder()
    .customizeResultScreen { resultBuilder in
        resultBuilder
            .setSuccessBackgroundColor(UIColor.brown)
            .setSuccesImage(UIImage(named: "success-icon")!)
            .setSuccessMessage(
                "success-message-text",
                color: UIColor.white,
                font: UIFont.systemFont(ofSize: 30)
            )
            .setErrorBackgroundColor(UIColor.systemPink)
            .setErrorImage(UIImage(named: "error-icon")!)
            .setErrorMessage(
                "error-message-text",
                color: UIColor.white,
                font: UIFont.systemFont(ofSize: 40)
            )
            .setRetryBackgroundColor(UIColor.magenta)
            .setRetryImage(UIImage(named: "retry-icon")!)
            .setRetryMessage(
                "retry-message-text",
                color: UIColor.white,
                font: UIFont.systemFont(ofSize: 40)
            )
            .setRetryButtonText("retry-button-text", font: UIFont.systemFont(ofSize: 35))
            .setRetryButtonColor(
                forContent: UIColor.cyan,
                background: UIColor.brown,
                border: UIColor.white
            )
    }

5. Tela de permissão da câmera

IdentificadorMétodos
(1) Back buttonsetBackButtonIcon(_:)
setBackButtonColor(forContent:background:border:)
(2) Camera imagesetCameraImage(_:color:)
(3) TitlesetTitle(text:color:font:)
(4) CaptionsetCaption(text:color:font:)
(5) Check permission buttonsetCheckPermissionButtonText(_:font:)
setCheckPermissionButtonColor(forContent:background:border:)
(6) BackgroundsetBackgroundColor(_:)
(7) Bottom sheetsetBottomSheetBackgroundColor(_:)
setBottomSheetCornerRadius(_:)
setBottomSheetTitle(text:color:font:)
setBottomSheetCaption(text:color:font:)
(8) Open settings buttonsetOpenSettingsButtonText(_:font:)
setOpenSettingsButtonColor(forContent:background:border:)
(9) Close buttonsetCloseButtonText(_:font:)
setCloseButtonColor(forContent:background:border:)

Código de exemplo

DocCoreCustomizationBuilder.builder()
    .customizeCameraPermissionScreen { cameraPermissionBuilder in
        cameraPermissionBuilder
            .setBackButtonIcon(UIImage(named: "back-button-icon")!)
            .setBackButtonColor(
                forContent: UIColor.red,
                background: UIColor.blue,
                border: UIColor.yellow
            )
            .setCameraImage(UIImage(named: "camera-icon"), color: UIColor.white)
            .setTitle(
                text: "title-text",
                color: UIColor.green,
                font: UIFont.systemFont(ofSize: 14)
            )
            .setCaption(
                text: "caption-text",
                color: UIColor.orange,
                font: UIFont.systemFont(ofSize: 16)
            )
            .setCheckPermissionButtonText("check-permission-button-text", font: UIFont.systemFont(ofSize: 20))
            .setCheckPermissionButtonColor(
                forContent: UIColor.purple,
                background: UIColor.systemPink,
                border: UIColor.brown
            )
            .setBackgroundColor(UIColor.green)
            .setBottomSheetBackgroundColor(UIColor.cyan)
            .setBottomSheetCornerRadius(CGFloat(15.0))
            .setBottomSheetTitle(
                text: "bottom-sheet-title-text",
                color: UIColor.yellow,
                font: UIFont.systemFont(ofSize: 30)
            )
            .setBottomSheetCaption(
                text: "bottom-sheet-caption-text",
                color: UIColor.white,
                font: UIFont.systemFont(ofSize: 20)
            )
            .setOpenSettingsButtonText("open-settings-button-text", font: UIFont.systemFont(ofSize: 18))
            .setOpenSettingsButtonColor(
                forContent: UIColor.black,
                background: UIColor.orange,
                border: UIColor.systemPink
            )
            .setCloseButtonText("close-button-text", font: UIFont.systemFont(ofSize: 12))
            .setCloseButtonColor(
                forContent: UIColor.magenta,
                background: UIColor.systemPink,
                border: UIColor.blue
            )
    }