RSDColorThemeElementObject
public struct RSDColorThemeElementObject : RSDColorThemeElement, RSDDecodableBundleInfo, Codable
RSDColorThemeElementObject tells the UI what the background color and foreground color are for a given view as
well as whether or not the foreground elements should use light style
.
-
Declaration
Swift
public let bundleIdentifier: String? -
Hint for whether or not the view uses light style for things like the progress bar and navigation buttons.
Declaration
Swift
public var usesLightStyle: Bool -
Available for watchOS.
The background color for this step. If undefined then the background color appropriate to the light style will be used.
-
Available for iOS and tvOS.
The background color for this step. If undefined then the background color appropriate to the light style will be used.
Declaration
Swift
public func backgroundColor(compatibleWith traitCollection: UITraitCollection?) -> UIColor?Return Value
The color or
nilif undefined. -
Available for watchOS.
The foreground color for this step. If undefined then the foreground color appropriate to the light style will be used.
-
Available for iOS and tvOS.
The foreground color for this step. If undefined then the foreground color appropriate to the light style will be used.
Declaration
Swift
public func foregroundColor(compatibleWith traitCollection: UITraitCollection?) -> UIColor?Return Value
The color or
nilif undefined. -
Default initializer.
Note
The color names used by thisCodableobject can be defined as either:- HEX-code values.
- Using a Color Asset if targeting devices that support this feature. For example, iOS 11 and above. See https://developer.apple.com/documentation/uikit/uicolor/2877380-init for more information.
A mapping file called
ColorInfo.plist
that includes key/value pairs where thekeyis the name included here and thevalueis a HEX-code color.Declaration
Swift
public init(usesLightStyle: Bool = false, backgroundColorName: String?, foregroundColorName: String? = nil, bundleIdentifier: String? = nil)Parameters
usesLightStyleHint for whether or not the view uses light style for things like the progress bar. Default =
false.backgroundColorNameThe name of the background color. Default =
nil.foregroundColorNameThe name of the foreground color. Default =
nil.bundleIdentifierThe bundle identifier for where to find the color asset or plist mapping file. Default =
nil.
View on GitHub
RSDColorThemeElementObject Structure Reference