BcmBranding

The SDK brading configuration struct (BcmBranding) is an optional interface. The interface is for an object to be assigned to BcmGlobalConfig's branding property. It allows you to configure branding of the SDK.

Please refer to the Branding page for a high-level overview.

Interface

Swift:

public struct BcmBranding {

    // MARK: - Custom colors
    /**
     * Tint color for control bars, navigation bars, and buttons.
     */
    let universalPrimary: UIColor

    /**
     * Finger live preview. Initial bounding box color.
     */
    let fingerLiveBoundingBoxInitial: UIColor

    /**
     * Finger live preview. Bounding box color when the configured score threshold is reached.
     */
    let fingerLiveBoundingBoxScoreReached: UIColor

    /**
     * Finger live preview. Bounding box color for fingers which are not selected.
     */
    let fingerLiveUnselected: UIColor

    /**
     * Finger selection view. Start button color.
     */
    let fingerSelectedStartButton: UIColor

    /**
     * Finger selection view. Finger is selected color.
     */
    let fingerSelected: UIColor

    /**
     * Finger selection view. Finger is unselected color.
     */
    let fingerUnselected: UIColor

    /**
     * Finger selection view. Finger is excluded color.
     */
    let fingerExcluded: UIColor

    /**
     * Scan View. Button Background Color.
     */
    let scanFragmentBtnBackground: UIColor

    /**
     * Scan View. Button Text Color.
     */
    let scanFragmentBtnText: UIColor

    /**
     * Scan View. Button size.
     */
    let scanFragmentBtnWidth: CGFloat
    let scanFragmentBtnHeight: CGFloat

    /**
     * Scan View. Status size.
     */
    let scanFragmentStatusWidth: CGFloat
    let scanFragmentStatusHeight: CGFloat

    /**
     * Scan View. Font size.
     */
    let scanFragmentBtnFontSize: CGFloat
    let scanFragmentInstructionFontSize: CGFloat

    // MARK: - Custom Images
    /**
     Scan intro GIF
     */
    let scanIntroGifPath: String

    /**
     Scan logo image
     */
    let scanLogo: UIImage?

    /**
     Calibration intro GIF
     */
    let calibrationIntroGifPath: String

    // MARK: - Custom Texts

    // MARK: Custom texts finger selection dialog.
    let txtFingerSelectionPortraitRBtnRight: String
    let txtFingerSelectionPortraitRBtnLeft: String
    let txtFingerSelectionPortraitBtnAll: String

    let txtFingerSelectionLandscapeBtnRightAll: String
    let txtFingerSelectionLandscapeBtnLeftAll: String

    let txtFingerSelectionTitle: String
    let txtFingerSelectionStart: String

    // MARK: Custom texts scan screen.
    let txtScanFragmentStatusLeftHand: String
    let txtScanFragmentStatusRightHand: String
    let txtScanFragmentStatusThumbs: String
    let txtScanFragmentStatusLeftThumb: String
    let txtScanFragmentStatusRightThumb: String
    let txtScanFragmentBtnNext: String
    let txtScanFragmentBtnFinish: String
    let txtSwitchFingersTitle: String
    let txtSwitchFingersBtnOk: String
    let txtIdCalibrationTitle: String
    let txtScanIdCalibrationInfo: String
    let txtHandScanTitle: String
    let txtHandScanInfo: String

    // MARK: Custom hand images on screen
    let imageScanFragmentHandTemplate: UIImage
    let imageScanFragmentBothThumbsTemplate: UIImage
    let imageScanFragmentLeftThumbsTemplate: UIImage
    let imageScanFragmentRightThumbsTemplate: UIImage
    let imageScanFragmentStatusLeftHand: UIImage
    let imageScanFragmentStatusRightHand: UIImage
    let imageScanFragmentStatusThumbs: UIImage
    let imageScanFragmentStatusLeftThumb: UIImage
    let imageScanFragmentStatusRightThumb: UIImage

    public init(
        universalPrimary: UIColor = UIColor(rgb: 0x00a8d0),
        fingerLiveBoundingBoxInitial: UIColor = UIColor.white,
        fingerLiveBoundingBoxScoreReached: UIColor = UIColor.green,
        fingerLiveUnselected: UIColor = UIColor.lightGray,
        fingerSelectedStartButton: UIColor = UIColor(rgb: 0x00a8d0),
        fingerSelected: UIColor = UIColor(rgb: 0x00a8d0),
        fingerUnselected: UIColor = UIColor.gray,
        fingerExcluded: UIColor = UIColor.red,
        scanFragmentBtnBackground: UIColor = UIColor.init(white: 0, alpha: 0.6),
        scanFragmentBtnText: UIColor = UIColor.white,
        scanFragmentBtnWidth: CGFloat = CGFloat(90),
        scanFragmentBtnHeight: CGFloat = CGFloat(90),
        scanFragmentStatusWidth: CGFloat = CGFloat(90),
        scanFragmentStatusHeight: CGFloat = CGFloat(90),
        scanFragmentBtnFontSize: CGFloat = CGFloat(30),
        scanFragmentInstructionFontSize: CGFloat = CGFloat(20),
        scanIntroGifPath: String = "scan_intro",
        scanLogo: UIImage? = BcmImages.bcm_scan_logo.image,
        calibrationIntroGifPath: String = "scan_intro",
        txtFingerSelectionPortraitRBtnRight: String = "right",
        txtFingerSelectionPortraitRBtnLeft: String = "left",
        txtFingerSelectionPortraitBtnAll: String = "all",
        txtFingerSelectionLandscapeBtnRightAll: String = "right all",
        txtFingerSelectionLandscapeBtnLeftAll: String = "left all",
        txtFingerSelectionTitle: String = "Tap on fingertip to select",
        txtFingerSelectionStart: String = "start",
        txtScanFragmentStatusLeftHand: String = "Now please put your LEFT HAND in front of the camera. \nYou can move your fingers in order to get the green boxes.",
        txtScanFragmentStatusRightHand: String = "Now please put your RIGHT HAND in front of the camera. \nYou can move your fingers in order to get the green boxes.",
        txtScanFragmentStatusThumbs: String = "Now please put your BOTH THUMBS in front of the camera. \nYou can move your fingers in order to get the green boxes.",
        txtScanFragmentStatusLeftThumb: String = "Now please put your LEFT THUMB in front of the camera.\nYou can move your fingers in order to get the green boxes.",
        txtScanFragmentStatusRightThumb: String = "Now please put your RIGHT THUMB in front of the camera.\nYou can move your fingers in order to get the green boxes.",
        txtScanFragmentBtnNext: String = "next",
        txtScanFragmentBtnFinish: String = "finish",
        txtSwitchFingersTitle: String = "Switch to next Fingers",
        txtSwitchFingersBtnOk: String = "OK",
        txtIdCalibrationTitle: String = "ID calibration info",
        txtScanIdCalibrationInfo: String = "1. Hold the card in your hand under the phone \n2. Make sure that the card fits into the template and is parallel to the phone \n3. Press start \n4. Keep the card still please do not move the phone or the card \n5. Wait for a few seconds till the phone is calibrated",
        txtHandScanTitle: String = "Hand scanning info",
        txtHandScanInfo: String = "1. Hold your fingers under the phone\n2. Make sure that your fingers fit into the screen\n3. Move your fingers slowly to get green boxes\n4. Continue with next fingers",
        imageScanFragmentHandTemplate: UIImage = BcmImages.bcm_right_hand_template.image,
        imageScanFragmentBothThumbsTemplate: UIImage = BcmImages.bcm_both_thumbs_template.image,
        imageScanFragmentLeftThumbsTemplate: UIImage = BcmImages.bcm_left_thumb_template.image,
        imageScanFragmentRightThumbsTemplate: UIImage = BcmImages.bcm_right_thumb_template.image,
        imageScanFragmentStatusLeftHand: UIImage = BcmImages.bcm_left_hand.image,
        imageScanFragmentStatusRightHand: UIImage = BcmImages.bcm_right_hand.image,
        imageScanFragmentStatusThumbs: UIImage = BcmImages.bcm_both_thumbs_template.image,
        imageScanFragmentStatusLeftThumb: UIImage = BcmImages.bcm_left_thumb_status.image,
        imageScanFragmentStatusRightThumb: UIImage = BcmImages.bcm_right_thumb_status.image

    ) {
        self.universalPrimary = universalPrimary
        self.fingerLiveBoundingBoxInitial = fingerLiveBoundingBoxInitial
        self.fingerLiveBoundingBoxScoreReached = fingerLiveBoundingBoxScoreReached
        self.fingerLiveUnselected = fingerLiveUnselected
        self.fingerSelectedStartButton = fingerSelectedStartButton
        self.fingerSelected = fingerSelected
        self.fingerUnselected = fingerUnselected
        self.fingerExcluded = fingerExcluded

        self.scanFragmentBtnBackground = scanFragmentBtnBackground
        self.scanFragmentBtnText = scanFragmentBtnText

        self.scanFragmentBtnWidth = scanFragmentBtnWidth
        self.scanFragmentBtnHeight = scanFragmentBtnHeight
        self.scanFragmentStatusWidth = scanFragmentStatusWidth
        self.scanFragmentStatusHeight = scanFragmentStatusHeight

        self.scanFragmentBtnFontSize = scanFragmentBtnFontSize
        self.scanFragmentInstructionFontSize = scanFragmentInstructionFontSize

        self.scanIntroGifPath = scanIntroGifPath
        self.scanLogo = scanLogo
        self.calibrationIntroGifPath = calibrationIntroGifPath

        self.txtFingerSelectionPortraitRBtnRight = txtFingerSelectionPortraitRBtnRight
        self.txtFingerSelectionPortraitRBtnLeft = txtFingerSelectionPortraitRBtnLeft
        self.txtFingerSelectionPortraitBtnAll = txtFingerSelectionPortraitBtnAll
        self.txtFingerSelectionLandscapeBtnRightAll = txtFingerSelectionLandscapeBtnRightAll
        self.txtFingerSelectionLandscapeBtnLeftAll = txtFingerSelectionLandscapeBtnLeftAll
        self.txtFingerSelectionTitle = txtFingerSelectionTitle
        self.txtFingerSelectionStart = txtFingerSelectionStart

        self.txtScanFragmentStatusLeftHand = txtScanFragmentStatusLeftHand
        self.txtScanFragmentStatusRightHand = txtScanFragmentStatusRightHand
        self.txtScanFragmentStatusThumbs = txtScanFragmentStatusThumbs
        self.txtScanFragmentStatusLeftThumb = txtScanFragmentStatusLeftThumb
        self.txtScanFragmentStatusRightThumb = txtScanFragmentStatusRightThumb
        self.txtScanFragmentBtnNext = txtScanFragmentBtnNext
        self.txtScanFragmentBtnFinish = txtScanFragmentBtnFinish
        self.txtSwitchFingersTitle = txtSwitchFingersTitle
        self.txtSwitchFingersBtnOk = txtSwitchFingersBtnOk
        self.txtIdCalibrationTitle = txtIdCalibrationTitle
        self.txtScanIdCalibrationInfo = txtScanIdCalibrationInfo
        self.txtHandScanTitle = txtHandScanTitle
        self.txtHandScanInfo = txtHandScanInfo

        self.imageScanFragmentHandTemplate = imageScanFragmentHandTemplate
        self.imageScanFragmentBothThumbsTemplate = imageScanFragmentBothThumbsTemplate
        self.imageScanFragmentLeftThumbsTemplate = imageScanFragmentLeftThumbsTemplate
        self.imageScanFragmentRightThumbsTemplate = imageScanFragmentRightThumbsTemplate
        self.imageScanFragmentStatusLeftHand = imageScanFragmentStatusLeftHand
        self.imageScanFragmentStatusRightHand = imageScanFragmentStatusRightHand
        self.imageScanFragmentStatusThumbs = imageScanFragmentStatusThumbs
        self.imageScanFragmentStatusLeftThumb = imageScanFragmentStatusLeftThumb
        self.imageScanFragmentStatusRightThumb = imageScanFragmentStatusRightThumb
    }

}

Example

Swift:

let bcmBranding = BcmBranding(
    fingerSelected: UIColor.green,
    scanLogo: UIImage(named: "my_logo")!,
    txtScanFragmentBtnFinish: "Match"
)

Initialize the branding config in the BcmGlobalConfig class

Swift:

let bcmGlobalConfig = BcmGlobalConfig(
        branding: bcmBranding)

See Also

results matching ""

    No results matching ""