Tweak
public struct Tweak<T: TweakableType>
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
-
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)
-
Hashing for a Tweak for A/B Testing in order for it to be stored.
Declaration
Swift
public var hashValue: Int
-
Declaration
Swift
public var tweakCluster: [AnyTweak]
View on GitHub
Tweak Structure Reference