CrystalDetermined
public protocol CrystalDetermined : Crystal
A protocol should only be adopted by Crystal
class.
// Determine the concrete theme type.
extension Crystal: CrystalDetermined {
public typealias Theme: AppTheme
}
Although this protocol is designed for Crystal
class, Crystal
class does not conform to CrystalDetermined
protocol
by default. When using this library, it’s your responsibility to make Crystal
class conform to CrystalDetermined
protocol,
in order to determine the concrete theme type.
-
The theme type.
Declaration
Swift
associatedtype Theme : CrystalThemeType
-
The current theme.
Assign a new value to this property is the same as calling
setTheme(_:animated:)
.Declaration
Swift
var theme: Theme { get set }