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

    // MARK: - Custom Images
    /**
     Scan logo image
     */
    let scanLogo: UIImage

    // MARK: - Custom Texts
    // MARK: Custom texts finger selection dialog.
    /**
     Right hand button text in portrait mode
     */
    let txtFingerSelectionPortraitRBtnRight: String

    /**
     Left hand button text in portrait mode
     */
    let txtFingerSelectionPortraitRBtnLeft: String

    /**
     All hand button text in portrait mode
     */
    let txtFingerSelectionPortraitBtnAll: String

    /**
     Right hand all button text in landscape mode
     */
    let txtFingerSelectionLandscapeBtnRightAll: String

    /**
     Left hand all button text in landscape mode
     */
    let txtFingerSelectionLandscapeBtnLeftAll: String

    /**
     Title in finger selection view
     */
    let txtFingerSelectionTitle: String

    /**
     Start button text in finger selection view
     */
    let txtFingerSelectionStart: String

    // MARK: Custom texts scan screen.
    /**
     Left hand text in scan view
     */
    let txtScanFragmentStatusLeftHand: String

    /**
     Right hand text in scan view
     */
    let txtScanFragmentStatusRightHand: String

    /**
     Thumbs text in scan view
     */
    let txtScanFragmentStatusThumbs: String

    /**
     Finish button text in scan view
     */
    let txtScanFragmentBtnFinish: String

    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,
        scanLogo: UIImage = UIImage(named: "bcm_scan_logo") ?? UIImage(),
        txtFingerSelectionPortraitRBtnRight: String = "right",
        txtFingerSelectionPortraitRBtnLeft: String = "left",
        txtFingerSelectionPortraitBtnAll: String = "all",
        txtFingerSelectionLandscapeBtnRightAll: String = "right all",
        txtFingerSelectionLandscapeBtnLeftAll: String = "left all",
        txtFingerSelectionTitle: String = 
        "Tap on fingertip to select, long press to exclude",
        txtFingerSelectionStart: String = "start",
        txtScanFragmentStatusLeftHand: String = "Left Hand",
        txtScanFragmentStatusRightHand: String = "Right Hand",
        txtScanFragmentStatusThumbs: String = "Thumbs",
        txtScanFragmentBtnFinish: String = "cancel" 

    ) {
        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.scanLogo = scanLogo
        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.txtScanFragmentBtnFinish = txtScanFragmentBtnFinish
    }

}

Example

Swift:

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

Initialize the branding config in the IBcmGlobalConfig class

Swift:

let bcmGlobalConfig = BcmGlobalConfig(
        branding: bcmBranding)

See Also

results matching ""

    No results matching ""