# Theme Setting

{% hint style="info" %}
**Using UIAppearance**

UIAppearance customizations are applied to AcquireIO SDK by default. However if there is a conflicting property, then the value in `ThemeOptions` key in `AcquireIOConfig` will take precedence.

For example: If the app uses UIAppearance to change the color of Navigation Bar title and also specifies a color for the same property in the `AcquireIOConfig ThemeOptions` `NSDictionary`, then the value in dictionary will be used. In order to use the UIAppearance value, the app must leave the corresponding entry in the `ThemeOptions` blank.

if you don't want to use `AcquireIOConfig ThemeOptions` properties to SDK the use init method attribute option to '`UseDefaultTheme`' to `@YES`.
{% endhint %}

![](https://4291449717-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-LN9EeARIb0jlqCV5rMw%2F-LN9Ei60l_D0ah3tJeT6%2FNavigationBar.png?alt=media\&token=2d199507-bbb2-44d2-b201-e96e2b938d84)

### Introduction <a href="#introduction" id="introduction"></a>

Head over to Theming if you want to customize your SDK integration's typeface, colors or fonts. It is done via simple key-value pairs in option dictionary.

### Configuration

Check this code in \[\[AcquireIO support] setAccount: withOptions:]; method, where withOptions parameter is an instance of AcquireIOConfig, set options dictionary in AcquireIOConfig using:

```objectivec
NSDictionary *options = @{};
AcquireIOConfig *config = [AcquireIOConfig config];
[config setDict:options];

//Pass `config` to- setAccount: withOptions:config
```

Set NSDictionary options in format of key value. Color code will be hex value of color, start from #. You can remove and leave blank for default theme effect. Sample format

```objectivec
NSDictionary *themeDict = [@{@"ACQUIREIO_GLOBAL": @{
                                           @"THEME_COLOR": @"#00ff00"
                                           },
                             @"ACQUIREIO_NAVIGATION_BAR": @{
                                           @"BAR_TINTCOLOR"         : @"#00ff00",
                                           @"TINT_COLOR"            : @"#fae1dd"
                                           },
                             @"ACQUIREIO_SYSTEM_BUTTON": @{
                                           @"BACKGROUND_COLOR": @"#ff0000",
                                           @"BUTTON_INSET_BOTTOM"   : @100,
                                           @"BUTTON_INSET_RIGHT"    : @90
                                           }
                                   } mutableCopy];
    
    
    
    NSDictionary *options = @{
                                ...
                             @"ThemeOptions": themeDict
                             };
```

### Theme Setting <a href="#theme-setting" id="theme-setting"></a>

To skin your app, make sure you add `AcquireIOConfig @"ThemeOptions"`.

| Property | Description                                                                                                                                                                                         |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Colors` | Colors are specified in hexadecimal format, e.g. `#FFFFFF` is White. # is required before code                                                                                                      |
| `Fonts`  | Font names should be specified by their family name & style. For example, **CaviareDreams-Bold** refers to Caviare Dreams *family* of bold *style*. See using custom fonts section for more details |

### Global Attributes <a href="#global-attributes" id="global-attributes"></a>

These attributes control the looks of in-app support over many screens.

| Property         | Description                                                                                                                                            |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `THEME_COLOR`    | Applies theme color to whole support SDK according to your app theme. Default theme color is `#3A6`                                                    |
| `FONT_NAME`      | Global font face - applies to texts for sections list, Chat list, Offline form and all. Default font is system font with size according to requirement |
| `BOLD_FONT_NAME` | Applies to headers on chat screen and title of pages. Default font is system bold font with size according to requirement                              |

### Navigation Bar <a href="#navigation-bar" id="navigation-bar"></a>

| Property        | Description                                                                                                                                                                                     |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BAR_STYLE`     | Use `UIBarStyleBlack` or `UIBarStyleDefault`. Default bar style is `UIBarStyleDefault`                                                                                                          |
| `BAR_TINTCOLOR` | The tint color to apply to the navigation bar background. This color is not made translucent by default unless you set the isTranslucent property to true. Default `BAR_TINTCOLOR` is `#FFFFFF` |
| `TINT_COLOR`    | The tint color is navigation title and back and other bar button items color. For more see image below. Default color is `#000000`                                                              |

### System Button Attributes <a href="#system-button-attributes" id="system-button-attributes"></a>

These attributes applies on default bottom right support button.

| Property              | Description                                                                 |
| --------------------- | --------------------------------------------------------------------------- |
| `BACKGROUND_COLOR`    | Applies to background color of button. Default theme color is `THEME_COLOR` |
| `BUTTON_INSET_BOTTOM` | Inset button from bottom in `NSNumber`. default bottom inset is 0.          |
| `BUTTON_INSET_RIGHT`  | Inset button from right in `NSNumber`. default right inset is 0.            |

### System Button Badge Attributes <a href="#system-button-badge-attributes" id="system-button-badge-attributes"></a>

These attributes applies on default bottom right support button notification badge.

| Property           | Description                                                       |
| ------------------ | ----------------------------------------------------------------- |
| `BACKGROUND_COLOR` | Applies to background color of button badge. Default color is red |
| `TEXT_COLOR`       | Button badge color. Default color is `#ffffff`.                   |

### Using Custom Fonts <a href="#using-custom-fonts" id="using-custom-fonts"></a>

Add the font to your project. Edit your app's plist file and add a key `"Fonts provided by application"` to it. Under the key, list out file names of all the fonts you want to use in your app and in support. If you've already listed such fonts, skip this step.

![](https://4291449717-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-LN9EeARIb0jlqCV5rMw%2F-LN9F1_w4tEq2jAlh6ye%2Ffont-screen.png?alt=media\&token=0683d74a-3780-4987-a517-2399008718c3)

**Step 2:** Copy the font's full name. To do this, select the font in Finder and hit **`COMMAND`**` ``⌘+I` (Get Info).

![](https://4291449717-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-LN9EeARIb0jlqCV5rMw%2F-LN9FCAVkyfSaMNtD3UV%2FfontName-screen.png?alt=media\&token=889e571b-effb-4059-aa0b-55346b3be3f2)

**Step 3:** Paste the font name into `AcquireIOConfig @"ThemeOptions" -> @"ACQUIREIO_GLOBAL" ->FONT_NAME`, wherever necessary

![](https://4291449717-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-LNxYVHfRlIavnBiPh8X%2F-LNxeuBmaeWBQyOh1kJq%2Fimage-sample-code-config-dict.png?alt=media\&token=7828300b-bc6c-407b-b495-a7ae334b7996)

**Step 4:** Test the font and theme in simulator. If font couldn't load by SDK then it will show error —

![](https://4291449717-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMa9C05MmCnAr03_v9O%2F-LN9EeARIb0jlqCV5rMw%2F-LN9FUqR8fSVcN5d9iyK%2Fsdk-theme.png?alt=media\&token=da7f4e5e-74a3-466e-90a8-2b1b441ba674)

### Orientation support <a href="#orientation-support" id="orientation-support"></a>

By default, the iOS SDK will follow the orientation of the app.
