Structs
The following structs are available globally.
-
A
See moreSortFunction
designed to animate in a corner like fashion. The views near the starting corner will animate first. In essence it appears to be a wiping function that will continue diagonally based on that corner.Declaration
Swift
public struct CorneredSortFunction: CornerSortFunction
-
The basic
See moreSortFunction
. Use this sort function if you want to animate in all views at the same time and give aninterObjectDelay
of0.0
. Note that thisSortFunction
will animate the views based on the order they were added to the animation view. This means that the way the views are sorted in thesubviews
array is the way that they will be sorted by thisSortFunction
.Declaration
Swift
public struct DefaultSortFunction: SortFunction
-
A
See moreSortFunction
that will animate all the views in with a random delay. No 2 views will animate in with the same offset. The views will be placed in an array, shuffled, and then each view will be asigned an offset given theinterObjectDelay
.Declaration
Swift
public struct RandomSortFunction: SortFunction
-
Internal struct to access CGPoint extensions. Use this to call methods such as
See more.euclideanDistance
Declaration
Swift
public struct SprucePoint
-
An internal struct that is used to relate a view with a time offset. This is used to determine when each view is set to animate.
Declaration
Swift
public struct TimedView
-
A wrapper around the spring
See moreUIViewAnimation
block with options publicly accessible. See, UIViewAnimation for more - Note:animationOptions
defaults to[]
. If you do not update this value before calling the animate method than the changes will not be reflected. - Note:damping
defaults to 0.5 andinitialVelocity
defaults to 0.7Declaration
Swift
public struct SpringAnimation: Animation
-
A
See moreSortFunction
that will offset the views in a circular fashion. This means that rather than looking flat like theCorneredSortFunction
, there will be a curve going out of the position as if the views were in an expanding circle.Declaration
Swift
public struct RadialSortFunction: PositionSortFunction
-
A
See moreLinear
wipingSortFunction
. This will consider the rows or columns of the views rather than looking at their exact coordinates. Views that have the same vertical or horizontal components, based on thedirection
, will animate in at the same time.Declaration
Swift
public struct LinearSortFunction: DirectionSortFunction
-
A
See moreSortFunction
that animates the views in as if they were reading text from left to right (based on the corner that you set). - Note: If you set any type of right corner, then the views will enter as if you are reading text from right to left.Declaration
Swift
public struct InlineSortFunction: CornerSortFunction
-
A
See moreSortFunction
that has variableinterObjectDelay
values using weights to structure when views should animate. Unlike otherSortFunction
implementations, for theContinuousWeightedSortFunction
you specify aduration
and theSortFunction
will compute the necessaryinterObjectDelay
values for each of the subviews. This means that the offset times will not be multiples of the delay like usual. The lighter the weight the faster the views will animate. - Note: If you had a lightverticalWeight
and a heavyhorizontalWeight
, the views that are vertically aligned with the starting position will animate before those that are horizontally aligned. This allows you to define the exact rigidness of aradial
likeSortFunction
. - Note: ThoughinterObjectDelay
is a value on this sort function, it will not be used. - Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers ofsubviews
.Declaration
Swift
public struct ContinuousWeightedSortFunction: PositionSortFunction, WeightSortFunction
-
A wrapper around the standard
See moreUIViewAnimation
block with options publicly accessible. See, UIViewAnimation for more - Note:animationOptions
defaults to.curveEaseOut
. If you do not update this value before calling the animate method than the changes will not be reflected.Declaration
Swift
public struct StandardAnimation: Animation
-
A
See moreSortFunction
that has variableinterObjectDelay
values. Unlike otherSortFunction
implementations, for theContinuousSortFunction
you specify aduration
and theSortFunction
will compute the necessaryinterObjectDelay
values for each of the subviews. This means that the offset times will not be multiples of the delay like usual. - Note: ThoughinterObjectDelay
is a value on this sort function, it will not be used. - Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers ofsubviews
.Declaration
Swift
public struct ContinuousSortFunction: PositionSortFunction