ScrollStep
public struct ScrollStep : MarqueeStep
ScrollStep types define the label position at a specified time delta since the last ScrollStep step, as well as
the animation curve to that position and edge fade state at the position
-
An enum that provides the possible positions defined by a ScrollStep
home: The starting, default position of the labelaway: The calculated position that results in the entirety of the label scrolling past.partial(CGFloat): A fractional value, specified by the associated CGFloat value, between thehomeandawaypositions (must be between 0.0 and 1.0).
The
awayposition depends on the MarqueeLabeltypevalue.- For
left,leftRight,right, andrightLefttypes, theawayposition means the trailing edge of the label is visible. ForleftRightandrightLeftdefault types, the scroll animation reverses direction after reaching this point and returns to thehomeposition. - For
continuousandcontinuousReversetypes, theawayposition is the location such that if the scroll is completed at this point (i.e. the animation is removed), there will be no visible change in the label appearance.
Declaration
Swift
public enum Position -
The desired time between this step and the previous
ScrollStepin a sequence.Declaration
Swift
public let timeStep: CGFloat -
The animation curve to utilize between the previous
ScrollStepin a sequence and this step.Note
The animation curve value for the firstScrollStepin a sequence has no effect.Declaration
Swift
public let timingFunction: UIView.AnimationCurve -
The position of the label for this scroll step.
See also
PositionDeclaration
Swift
public let position: Position -
The option set defining the edge fade state for this scroll step.
Possible options include
.leadingand.trailing, corresponding to the leading edge of the label scrolling (i.e. the direction of scroll) and trailing edge of the label.Declaration
Swift
public let edgeFades: EdgeFade