TweakLibraryType

public protocol TweakLibraryType

Create a public struct in your application that conforms to this protocol to declare your own tweaks!

  • assign(_:) Extension method

    Returns 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 method

    Immediately 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