compare(_:toRange:document:)
Compares ranges from the set of matches the aggregator provides to determine navigation order.
Declaration
func compare(_ foundRange: UITextRange, toRange: UITextRange, document: Self.DocumentIdentifier?) -> ComparisonResultParameters
- foundRange:
The range of characters in a text container to compare from.
- toRange:
The range of characters in a text container to compare to.
- document:
A string that uniquely identifies the document containing the text ranges.
Nilwhen searching a single document.
Return Value
Returns the result of comparing the two text ranges.
Discussion
The system calls this method during a find session to determine which UITextRange to highlight next when a user taps the “next” or “previous” button.