CrystalCompatible
public protocol CrystalCompatible : AnyObject
A type that has crystal extensions. You can use cst
property to get extension methods.
// Make `UIView` conform to `CrystalCompatible`.
extension UIView: CrystalCompatible {
public typealias Theme: AppTheme
}
When conforming to CrystalCompatible
, you have to determine the concrete theme type in the conformance.
-
The theme type that is determined when making protocol conformance.
Declaration
Swift
associatedtype Theme : CrystalThemeType
-
cst
Extension methodCrystal namespace used to expose available methods and properties.
Declaration
Swift
public var cst: Crystalline<Self, Theme> { get }