ThemeEngine

public class ThemeEngine

The class that controls the themes in the app

  • The standard ThemeEngine. If you use this, it should be configured in the AppDelegate didFinishLaunchingWithOptions

    Declaration

    Swift

    public static let standard: ThemeEngine
  • The current theme

    Declaration

    Swift

    public private(set) var currentTheme: Theme?
  • The default theme

    Declaration

    Swift

    public var defaultTheme: Theme! { get set }
  • Whether the ThemeEngine has been configured

    Declaration

    Swift

    public var isReady: Bool
  • Initialize the ThemeEngine with a default theme. The ThemeEngine should be configured after this.

    Declaration

    Swift

    public init(defaultTheme: Theme?)
  • Sets the current theme

    Declaration

    Swift

    public func setTheme(theme: Theme)

    Parameters

    theme

    The theme to set

  • Makes the ets the currentTheme and the defaultTheme

    Declaration

    Swift

    public func configure(theme: Theme)

    Parameters

    theme

    The theme to make the default

  • Registers a client to be notified of any theme updates

    Declaration

    Swift

    public func register(_ client: ThemeEngineDelegate)

    Parameters

    client

    The client to be notified