TweakLibraryType
public protocol TweakLibraryType
Create a public struct in your application that conforms to this protocol to declare your own tweaks!
-
the default tweak store
Declaration
Swift
static var defaultStore: TweakStore
-
assign(_:)
Extension methodReturns the current value for a tweak from the TweakLibrary’s default store.
Declaration
Swift
public static func assign<T>(_ tweak: Tweak<T>) -> T
Parameters
tweak
the tweak to assign
-
bind(_:binding:)
Extension methodImmediately binds the currentValue of a given tweak, and then continues to update whenever the tweak changes.
Declaration
Swift
public static func bind<T>(_ tweak: Tweak<T>, binding: @escaping (T) -> Void)
Parameters
tweak
the tweak to bind
binding
the binding to issue for the tweak