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, _ collectionName: String = "Mixpanel", _ groupName: String = "Mixpanel")
Parameters
tweakName
name of the tweak
defaultValue
the default value set for the tweak
collectionName
the collection name of the tweak (do not set, optional)
groupName
the group name of the tweak (do not set, optional)
-
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, _ collectionName: String = "Mixpanel", _ groupName: String = "Mixpanel")
Parameters
tweakName
name of the tweak
defaultValue
the default value set for the tweak
minimumValue
minimum value to allow for the tweak
maximumValue
maximum value to allow for the tweak
stepSize
step size for the tweak (do not set, optional)
collectionName
the collection name of the tweak (do not set, optional)
groupName
the group name of 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]