> 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/sdk-lite/sdk-lite-english-pt-br/configuracao/ios/ui-customization.md).

# Personalização da interface

De **2.1.0**, `CafFaceLivenessLite` aceita um opcional `uiCustomization` parâmetro para combinar a tela de liveness com a sua marca. Tudo é opcional: omita o parâmetro — ou deixe campos individuais `nil` — e a tela mantém sua aparência padrão.

De **3.0.0** este parâmetro é passado para `setup` em vez de para `startSDK`.

## CerttaUiCustomization

| Propriedade | Tipo                         | Padrão | Descrição                                                       |
| ----------- | ---------------------------- | ------ | --------------------------------------------------------------- |
| `mask`      | `CerttaMaskCustomization?`   | `nil`  | Área ao redor do oval do rosto                                  |
| `appBar`    | `CerttaAppBarCustomization?` | `nil`  | Barra de cabeçalho: título, logotipo e botão de fechar          |
| `prompt`    | `CerttaPromptCustomization?` | `nil`  | Mensagem de orientação exibida ao usuário durante a captura     |
| `fontName`  | `String?`                    | `nil`  | Fonte usada tanto para o título quanto para o texto da mensagem |

## CerttaAppBarCustomization

| Propriedade            | Tipo       | Padrão          | Descrição                                     |
| ---------------------- | ---------- | --------------- | --------------------------------------------- |
| `title`                | `String?`  | sem título      | Texto do título exibido no topo da tela       |
| `titleColor`           | `UIColor?` | `.white`        | Cor do texto do título                        |
| `color`                | `UIColor?` | transparente    | Cor de fundo da barra de cabeçalho            |
| `closeButton`          | `UIImage?` | ícone integrado | Imagem usada para o botão de fechar           |
| `closeButtonTintColor` | `UIColor?` | `.white`        | Cor de tonalidade aplicada ao botão de fechar |
| `logoIcon`             | `UIImage?` | sem logotipo    | Logotipo exibido ao lado do título            |

## CerttaPromptCustomization

| Propriedade       | Tipo       | Padrão            | Descrição                                         |
| ----------------- | ---------- | ----------------- | ------------------------------------------------- |
| `textColor`       | `UIColor?` | `.white`          | Cor do texto da mensagem                          |
| `backgroundColor` | `UIColor?` | preto translúcido | Cor de fundo da mensagem                          |
| `isRounded`       | `Bool`     | `true`            | Se a mensagem é desenhada com cantos arredondados |

## CerttaMaskCustomization

| Propriedade     | Tipo       | Padrão            | Descrição                                                           |
| --------------- | ---------- | ----------------- | ------------------------------------------------------------------- |
| `isBlurEnabled` | `Bool`     | `true`            | Se o efeito de desfoque e vinheta fora do oval do rosto é desenhado |
| `color`         | `UIColor?` | preto translúcido | Cor aplicada à área fora do oval do rosto                           |

{% hint style="info" %}

* Apenas os valores que você definir são aplicados — cada campo deixado `nil` mantém o padrão.
* `isBlurEnabled` e `isRounded` não são opcionais. Quando você fornece um `mask` ou `prompt` bloco, seus valores são sempre aplicados, mas ambos têm como padrão `true`, o que é exatamente o comportamento atual — uma personalização parcial não pode alterá-los por acidente.
* `fontName` deve ser uma fonte disponível para o seu app (uma fonte do sistema ou uma registrada pelo seu bundle). Se o nome não puder ser resolvido, ele é ignorado e a fonte padrão é mantida. Isso se aplica tanto ao título quanto ao texto da mensagem.
  {% endhint %}

## Exemplo — personalização completa

```swift
import CafFaceLivenessLite

let customization = CerttaUiCustomization(
    mask: CerttaMaskCustomization(
        isBlurEnabled: true,
        color: UIColor.black.withAlphaComponent(0.6)
    ),
    appBar: CerttaAppBarCustomization(
        title: "Verificação facial",
        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.setup(
    mobileToken: "your_mobile_token",
    personId: "your_person_id",
    customLocalization: nil,
    customLocalizationBundle: nil,
    uiCustomization: customization,
    environment: .prod,
    loading: true
)
sdk.startSDK(viewController: self)
```

## Exemplo — personalização parcial

Personalize apenas o que você precisa; todo o resto permanece no padrão.

```swift
let customization = CerttaUiCustomization(
    appBar: CerttaAppBarCustomization(
        title: "Verificação facial",
        color: UIColor(red: 0.11, green: 0.13, blue: 0.35, alpha: 1.0)
    )
)

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

Para personalizar os **textos** exibidos na tela em vez da aparência dela, use `customLocalization` e `customLocalizationBundle`. Veja [Localização personalizada com um bundle de framework](/sdk-lite/sdk-lite-english-pt-br/configuracao/ios/start-sdk.md#custom-localization-with-a-framework-bundle).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.caf.io/sdk-lite/sdk-lite-english-pt-br/configuracao/ios/ui-customization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
