StyleManager
open class StyleManager
A manager that handles Style objects. The manager listens for significant time changes
and changes to the content size to apply an appropriate style for the given condition.
-
The receiver of the delegate. See
StyleManagerDelegatefor more information.Declaration
Swift
public weak var delegate: StyleManagerDelegate? -
Determines whether the style manager should apply a new style given the time of day.
Precondition
Two styles must be provided for this property to have any effect.Declaration
Swift
public var automaticallyAdjustsStyleForTimeOfDay: Bool { get set } -
The styles that are in circulation. Active style is set based on the sunrise and sunset at your current location. A change of preferred content size by the user will also trigger an update.
Precondition
Two styles must be provided forStyleManager.automaticallyAdjustsStyleForTimeOfDayto have any effect.Declaration
Swift
public var styles: [Style] { get set } -
The currently applied style. Use
StyleManager.applyStyle(type:)to update this value.Declaration
Swift
public private(set) var currentStyleType: StyleType? { get } -
The current style associated with
currentStyleType. CallingStyleManager.applyStyle(type:)will result in this value being updated.Declaration
Swift
public private(set) var currentStyle: Style? { get set } -
Applies the
Stylewith type matchingtypeand notifiesStyleManager.delegateupon completion.Declaration
Swift
public func applyStyle(type styleType: StyleType)
Install in Dash
StyleManager Class Reference