compare(_:)
Indicates the depth-first traversal order of the receiving index path and another index path.
Declaration
func compare(_ otherObject: IndexPath) -> ComparisonResultParameters
- otherObject:
Index path to compare.
This value must not be
nil. If the value isnil, the behavior is undefined.
Return Value
The depth-first traversal ordering of the receiving index path and indexPath.
Discussion
ComparisonResult.orderedAscending: The receiving index path comes before
indexPath.ComparisonResult.orderedDescending: The receiving index path comes after
indexPath.ComparisonResult.orderedSame: The receiving index path and
indexPathare the same index path.