Tweak
public struct Tweak<T> where T : TweakableType
extension Tweak: Hashable
extension Tweak: TweakClusterType
Tweaks let you adjust things on the fly. Because each T needs a UI component, we have to restrict what T can be - hence T: TweakableType. If T: SignedNumberType, you can declare a min / max for a Tweak.
-
Initializer for a Tweak for A/B Testing
Declaration
Swift
public init(tweakName: String, defaultValue: T)Parameters
tweakNamename of the tweak
defaultValuethe default value set for the tweak
-
Hashing for a Tweak for A/B Testing in order for it to be stored.
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public var tweakCluster: [AnyTweak] { get }
-
Creates a Tweak
where T: SignedNumberType You can optionally provide a min / max / stepSize to restrict the bounds and behavior of a tweak. Declaration
Swift
public init(tweakName: String, defaultValue: T, min minimumValue: T? = nil, max maximumValue: T? = nil, stepSize: T? = nil)Parameters
tweakNamename of the tweak
defaultValuethe default value set for the tweak
minimumValueminimum value to allow for the tweak
maximumValuemaximum value to allow for the tweak
stepSizestep size for the tweak (do not set, optional)
View on GitHub
Tweak Structure Reference