StyleSheetSettings
public struct StyleSheetSettings
API to load and apply style sheet information (to override color definitions)
Changes made to the manager affect all future calls to Color.preferredColor(_:background:interface:display:).
Example Usage
var colorOverrides = """
@primaryLabel:#FF6000;
@primaryLabel_darkBackground:#00FFFF;
"""
try? StyleSheetSettings.loadStylesheetByString(content: colorOverrides)
-
Undocumented
Declaration
Swift
public static func reset() -
Load a specific stylesheet for theming with an given URL to the style sheet
Declaration
Swift
public static func loadStylesheetByURL(url: URL) throwsParameters
urlThe
URLto the style sheet -
Load a stylesheet as
Stringrepresentation of style sheet fileDeclaration
Swift
public static func loadStylesheetByString(content: String) throwsParameters
contentthe
Stringrepresentation of a style sheet file document