RandomSortFunction

public struct RandomSortFunction: 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.

  • Undocumented

    Declaration

    Swift

    public struct RandomSortFunction: SortFunction
  • Undocumented

    Declaration

    Swift

    public struct RandomSortFunction: 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.

    Declaration

    Swift

    public func timeOffsets(view: UIView, recursiveDepth: Int) -> [TimedView]

    Parameters

    view

    the view whose subviews should be animated. This view should not be included in the returned array

    recursiveDepth

    an int describing how deep into the view hiearchy the subview search should go, defaults to 0. A value of 0 is the same as calling the subviews on the actual view itself. Therefore a depth of 1 will be getting the subviews of each of the subviews, etc…

    Return Value

    an array of TimedView’s which contain references to the view needed to be animated and the time offset for when the animation of that individual view should start relative to the start of the overall animation