Crystalline
public class Crystalline<Target, Theme> : CrystallineType where Target : AnyObject, Theme : CrystalThemeType
Wrapper for crystal compatible types.
-
Apply the theme to the target object in a closure.
If you call this method multiple times on the same object, only the last call will take effect.
Declaration
Swift
public func apply(_ closure: @escaping (_ target: Target, _ theme: Theme) -> Void)
Parameters
closure
A clourse where you apply the theme.
target
The target object you want to apply the theme to.
theme
The theme.
-
Apply the theme to the target object in a closure.
If you call this method multiple times with the same key, only the last one will take effect.
Declaration
Swift
public func apply(key: String, _ closure: @escaping (_ target: Target, _ theme: Theme) -> Void)
Parameters
key
An unique key used to distinguish different closures.
closure
A clourse where you apply the theme.
target
The target object you want to apply the theme to.
theme
The theme.