> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-sdk/ios/standalone-modules/caffacelivenesslite/ui-customization.md).

# UI Customization

Quick links: [Overview](/caf-sdk/ios/standalone-modules/caffacelivenesslite.md) | [Building the SDK](/caf-sdk/ios/standalone-modules/caffacelivenesslite/builder.md) | [Start Liveness Verification](/caf-sdk/ios/standalone-modules/caffacelivenesslite/start-sdk.md) | [UI Customization](/caf-sdk/ios/standalone-modules/caffacelivenesslite/ui-customization.md) | [Installation](/caf-sdk/ios/standalone-modules/caffacelivenesslite/installation.md) | [Current Version](/caf-sdk/ios/standalone-modules/caffacelivenesslite/current-version.md) | [Requirements](/caf-sdk/ios/standalone-modules/caffacelivenesslite/requirements.md) | [Source Code](/caf-sdk/ios/standalone-modules/caffacelivenesslite/source-code.md) | [Result Reference](/caf-sdk/ios/standalone-modules/caffacelivenesslite/result-reference.md) | [Release Notes](/caf-sdk/ios/standalone-modules/caffacelivenesslite/release-notes.md) | [FAQ](/caf-sdk/ios/standalone-modules/caffacelivenesslite/faq_caf_face_liveness_sdk.md)

From **2.1.0**, `CafFaceLivenessLite` accepts an optional `uiCustomization` parameter on `startSDK` 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.

## 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                     |

{% hint style="info" %}

* 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.
  {% endhint %}

## Example — full customization

```swift
import CafFaceLivenessLite

let customization = CerttaUiCustomization(
    mask: CerttaMaskCustomization(
        isBlurEnabled: true,
        color: UIColor.black.withAlphaComponent(0.6)
    ),
    appBar: CerttaAppBarCustomization(
        title: "Facial verification",
        titleColor: .white,
        color: UIColor(red: 0.11, green: 0.13, blue: 0.35, alpha: 1.0),
        closeButton: UIImage(named: "close_icon"),
        closeButtonTintColor: .white,
        logoIcon: UIImage(named: "brand_logo")
    ),
    prompt: CerttaPromptCustomization(
        textColor: .white,
        backgroundColor: UIColor.black.withAlphaComponent(0.8),
        isRounded: true
    ),
    fontName: "HelveticaNeue-Medium"
)

sdk.startSDK(
    viewController: self,
    mobileToken: "your_mobile_token",
    personId: "your_person_id",
    customLocalization: nil,
    customLocalizationBundle: nil,
    uiCustomization: customization,
    environment: .prod,
    loading: true
)
```

## Example — partial customization

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

```swift
let customization = CerttaUiCustomization(
    appBar: CerttaAppBarCustomization(
        title: "Facial verification",
        color: UIColor(red: 0.11, green: 0.13, blue: 0.35, alpha: 1.0)
    )
)

sdk.startSDK(
    viewController: self,
    mobileToken: "your_mobile_token",
    personId: "your_person_id",
    customLocalization: nil,
    customLocalizationBundle: nil,
    uiCustomization: customization,
    environment: .prod,
    loading: true
)
```

To customize the **texts** shown on the screen rather than its appearance, use `customLocalization` and `customLocalizationBundle` — see [Start Liveness Verification](/caf-sdk/ios/standalone-modules/caffacelivenesslite/start-sdk.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.caf.io/caf-sdk/ios/standalone-modules/caffacelivenesslite/ui-customization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
