Structs

The following structs are available globally.

  • A SortFunction 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.

    See more

    Declaration

    Swift

    public struct CorneredSortFunction: CornerSortFunction
  • The basic SortFunction. Use this sort function if you want to animate in all views at the same time and give an interObjectDelay of 0.0. Note that this SortFunction 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 the subviews array is the way that they will be sorted by this SortFunction.

    See more

    Declaration

    Swift

    public struct DefaultSortFunction: SortFunction
  • A SortFunction 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 the interObjectDelay.

    See more

    Declaration

    Swift

    public struct RandomSortFunction: SortFunction
  • Internal struct to access CGPoint extensions. Use this to call methods such as .euclideanDistance

    See more

    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 UIViewAnimation 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 and initialVelocity defaults to 0.7

    See more

    Declaration

    Swift

    public struct SpringAnimation: Animation
  • Access to all of the Spruce library animations. Use this to call functions such as .animate or .prepare

    See more

    Declaration

    Swift

    public struct Spruce
  • Undocumented

    See more
  • A Linear wiping SortFunction. 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 the direction, will animate in at the same time.

    See more

    Declaration

    Swift

    public struct LinearSortFunction: DirectionSortFunction
  • A SortFunction 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.

    See more

    Declaration

    Swift

    public struct InlineSortFunction: CornerSortFunction
  • A SortFunction that has variable interObjectDelay values using weights to structure when views should animate. Unlike other SortFunction implementations, for the ContinuousWeightedSortFunction you specify a duration and the SortFunction will compute the necessary interObjectDelay 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 light verticalWeight and a heavy horizontalWeight, 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 a radial like SortFunction. - Note: Though interObjectDelay 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 of subviews.

    See more

    Declaration

    Swift

    public struct ContinuousWeightedSortFunction: PositionSortFunction, WeightSortFunction
  • A wrapper around the standard UIViewAnimation 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.

    See more

    Declaration

    Swift

    public struct StandardAnimation: Animation
  • A SortFunction that has variable interObjectDelay values. Unlike other SortFunction implementations, for the ContinuousSortFunction you specify a duration and the SortFunction will compute the necessary interObjectDelay values for each of the subviews. This means that the offset times will not be multiples of the delay like usual. - Note: Though interObjectDelay 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 of subviews.

    See more

    Declaration

    Swift

    public struct ContinuousSortFunction: PositionSortFunction