For the complete documentation index, see llms.txt. This page is also available as Markdown.

UI Customization

From 2.1.0, CafFaceLivenessLite accepts an optional uiCustomization parameter to match the liveness screen to your brand. Everything is optional: omit the parameter — or leave individual fields nil — and the screen keeps its default appearance.

From 3.0.0 this parameter is passed to setup rather than to startSDK.

CerttaUiCustomization

Property
Type
Default
Description

mask

CerttaMaskCustomization?

nil

Area around the face oval

appBar

CerttaAppBarCustomization?

nil

Header bar: title, logo and close button

prompt

CerttaPromptCustomization?

nil

Guidance prompt shown to the user during capture

fontName

String?

nil

Font used for both the title and the prompt text

CerttaAppBarCustomization

Property
Type
Default
Description

title

String?

no title

Title text displayed at the top of the screen

titleColor

UIColor?

.white

Color of the title text

color

UIColor?

transparent

Background color of the header bar

closeButton

UIImage?

built-in icon

Image used for the close button

closeButtonTintColor

UIColor?

.white

Tint color applied to the close button

logoIcon

UIImage?

no logo

Logo displayed next to the title

CerttaPromptCustomization

Property
Type
Default
Description

textColor

UIColor?

.white

Color of the prompt text

backgroundColor

UIColor?

translucent black

Background color of the prompt

isRounded

Bool

true

Whether the prompt is drawn with rounded corners

CerttaMaskCustomization

Property
Type
Default
Description

isBlurEnabled

Bool

true

Whether the blur and vignette effect outside the face oval is drawn

color

UIColor?

translucent black

Color applied to the area outside the face oval

  • Only the values you set are applied — every field left nil keeps its default.

  • isBlurEnabled and isRounded are non-optional. When you supply a mask or prompt block, their values are always applied, but both default to true, which is exactly the current behavior — a partial customization cannot change them by accident.

  • fontName must be a font available to your app (a system font or one registered by your bundle). If the name cannot be resolved, it is ignored and the default font is kept. It applies to the title and the prompt text alike.

Example — full customization

Example — partial customization

Customize only what you need; everything else stays at its default.

To customize the texts shown on the screen rather than its appearance, use customLocalization and customLocalizationBundle — see Start Liveness Verification.

Last updated