Setting Color Scheme

Setting Brand Colors

It’s possible to override the UI colors managed by the VenueNext SDK to match your own branding. Simply implement a subclass of VNBaseTheme and override any or all of the theme properties, and then pass the instance to the appropriate configure method:

VenueNextWeb.shared.configureTheme(VNBaseTheme())

Another option would be to implement the VNThemable protocol, as shown below:

import UIKit
import VNWebSDK

class AppDelegate: UIResponder, UIApplicationDelegate, VNThemable {

    var window: UIWindow?

    var navigationBarBackground: UIColor = UIColor.black
    var accent: UIColor = UIColor.white
    var backString: String = "Back"
    var closeString: String = "Close"

    public func applicationDidFinishLaunching(_ application: UIApplication) {
        ...
        VenueNextWeb.shared.configureTheme(self)
    }
}

Upon dismissal of the VenueNext web view, navigation bar colors will also revert back to what they were prior to presentation of the web view in the event you choose to use multiple color schemes for different areas of your application.

Color Descriptions and Defaults

Generic colors

navigationBarBackground

  • Default: UIColor.black
  • Uses: This sets the color of the navigation bar. This color should always contrast accent

accent

  • Default: UIColor.white
  • Uses: This color is used for long lived elements, such as the navigation bar text and buttons.

Updated: