ContinuousWeightedSortFunction
public struct ContinuousWeightedSortFunction: PositionSortFunction, WeightSortFunction
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.
-
A
SortFunctionthat has variableinterObjectDelayvalues using weights to structure when views should animate. Unlike otherSortFunctionimplementations, for theContinuousWeightedSortFunctionyou specify adurationand theSortFunctionwill compute the necessaryinterObjectDelayvalues 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 lightverticalWeightand 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 aradiallikeSortFunction. - Note: ThoughinterObjectDelayis 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 var interObjectDelay: TimeInterval = 0.0 -
A
SortFunctionthat has variableinterObjectDelayvalues using weights to structure when views should animate. Unlike otherSortFunctionimplementations, for theContinuousWeightedSortFunctionyou specify adurationand theSortFunctionwill compute the necessaryinterObjectDelayvalues 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 lightverticalWeightand 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 aradiallikeSortFunction. - Note: ThoughinterObjectDelayis 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 var position: Position -
A
SortFunctionthat has variableinterObjectDelayvalues using weights to structure when views should animate. Unlike otherSortFunctionimplementations, for theContinuousWeightedSortFunctionyou specify adurationand theSortFunctionwill compute the necessaryinterObjectDelayvalues 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 lightverticalWeightand 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 aradiallikeSortFunction. - Note: ThoughinterObjectDelayis 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 var reversed: Bool = false -
Undocumented
Declaration
Swift
public struct ContinuousWeightedSortFunction: PositionSortFunction, WeightSortFunction -
A
SortFunctionthat has variableinterObjectDelayvalues using weights to structure when views should animate. Unlike otherSortFunctionimplementations, for theContinuousWeightedSortFunctionyou specify adurationand theSortFunctionwill compute the necessaryinterObjectDelayvalues 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 lightverticalWeightand 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 aradiallikeSortFunction. - Note: ThoughinterObjectDelayis 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 var horizontalWeight: Weight -
A
SortFunctionthat has variableinterObjectDelayvalues using weights to structure when views should animate. Unlike otherSortFunctionimplementations, for theContinuousWeightedSortFunctionyou specify adurationand theSortFunctionwill compute the necessaryinterObjectDelayvalues 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 lightverticalWeightand 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 aradiallikeSortFunction. - Note: ThoughinterObjectDelayis 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 var verticalWeight: Weight -
Undocumented
Declaration
Swift
public struct ContinuousWeightedSortFunction: PositionSortFunction, WeightSortFunction -
A
SortFunctionthat has variableinterObjectDelayvalues using weights to structure when views should animate. Unlike otherSortFunctionimplementations, for theContinuousWeightedSortFunctionyou specify adurationand theSortFunctionwill compute the necessaryinterObjectDelayvalues 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 lightverticalWeightand 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 aradiallikeSortFunction. - Note: ThoughinterObjectDelayis 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 func timeOffsets(view: UIView, recursiveDepth: Int) -> [TimedView]Parameters
viewthe view whose subviews should be animated. This view should not be included in the returned array
recursiveDepthan 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
subviewson 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
View on GitHub
ContinuousWeightedSortFunction Struct Reference