Link Search Menu Expand Document

USPs

The unique selling points on the landing page have certain elements that can be customised.

Steps
  1. Create CTStyle Instance
  2. Set Landing Page Logo Image
  3. Set USP Style
  4. Pass CTStyle instance into the SDK

Create CTStyle Instance

First, create an instance of CTStyle.

let style = CTStyle(theme: .dark,  // .dark or .light
    primaryColor: UIColor.gray)

Set Landing Page Logo Image

style.landingPageLogoImage = UIImage(named: "usp_logo") // USP Logo

// To use NSURL property, UIImage property must not be set
cashStyle.landingPageLogoURL = URL(string: "http://www.cartrawler.com/usp_logo.png") // USP Logo 

// Dark Mode logo
cashStyle.dmLandingPageLogoImage = UIImage(named: "dark_usp_logo") // USP Logo

// To use NSURL property, UIImage property must not be set
cashStyle.dmLandingPageLogoURL = URL(string: "http://www.cartrawler.com/dark_usp_logo.png") // USP Logo

If logo is provided as UIImage, NSURL property will be ignored.
If dark logo is not set, default landing page logo will be used.
If you don’t provide any attributes for the logo, the component that shows the logo will be hidden.


Set USP Style

The USP icons can be replaced with checkmarks by setting the landingPageStyle.

style.landingPageStyle = .checkmark // default is .default

Pass CTStyle instance into the SDK

After configuring the CTStyle object, pass it into the SDK during initialisation:

CarTrawlerSDK.sharedInstance().initialiseSDK(with: style,
                              customParameters: nil,
                              production: false)