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) throws
Parameters
url
The
URL
to the style sheet -
Load a stylesheet as
String
representation of style sheet fileDeclaration
Swift
public static func loadStylesheetByString(content: String) throws
Parameters
content
the
String
representation of a style sheet file document