Customizing the look

This page shows you the different ways that you can customize the UI provided by the SDK.

Before you start

Before you start, note the following useful information:

  • You can customize the primary color used in the SDK.
  • You can customize the way that Help Center articles appear using CSS.
  • Some colors in the Support SDK UI are inherited from your app, like the navigation bar.
  • It's not possible to move elements of the UI around, remove parts of the UI, or add new parts. If this is important to you, consider using the SDK's API providers to build your own UI.

How Theming works

To change the primary color of the SDK, simply set Theme.currentTheme.primaryColor. This changes the tint color throughout the SDK to make it look like part of your app.

Change the colors of the UI

Swift

// Create a ZDKTheme object
Theme.currentTheme.primaryColor = UIColor.orange

Objective-C

[ZDKTheme currentTheme].primaryColor = [UIColor orangeColor];

Change the style of Help Center articles

The default styles for Help Center articles are defined in the help_center_article_style.css file in the ZendeskSDK.framework file in your project. To review the styles in Xcode, expand the bundle in Project navigator and select the css file.

To customize the article styles:

  1. Create a second help_center_article_style.css file and save it in your project's root folder.

  2. Import the new file into your project:

    1. In Xcode, select your project (the top-most icon) in Project navigator, then select File > Add Files to "your_project_name" from the Xcode menu.
    2. Navigate to and select your css file and click Add.

      The file should appear in Project navigator. From this point on, the app will ignore the help_center_article_style.css file in the ZendeskSDK.bundle.

  3. Add and customize the CSS in the new file.

Hiding the footer of Help Center articles

Help Center articles include a footer element that displays the author and date of the article's last update.

To hide the footer, add the following to your help_center_article_style.css file:

footer {
    display: none;
}