CornerSortFunction
public protocol CornerSortFunction: DistanceSortFunction
A DistanceSortFunction that uses a corner attribute to define an animation’s starting point.
-
The starting corner for the animation. Views will animate vertically and horizontally from this corner.
Declaration
Swift
var corner: Corner
-
distancePoint(view:subviews:)Extension methodThe starting corner for the animation. Views will animate vertically and horizontally from this corner.
Declaration
Swift
public func distancePoint(view: UIView, subviews: [View] = []) -> CGPointParameters
viewthe view for which the point coordinates will base their values off of
subviewsthe subviews that are allocated for the
SortFunction. The reason these are passed into the function is so that you can actually grab a reference point of a subview that is closest to the comparison point. This is done so that at least one view will start at the 0s marker.Return Value
a
CGPointobject that will allow all views to compare their reference point to this returned value. Iftranslatewas used, this returned value should be equal to one of thesubviewsreference points.
View on GitHub
CornerSortFunction Protocol Reference