Returns a comparison result that indicates the location of the destination in the document, relative to the current position.
- iOS 11.0+
- macOS 10.5+
- Mac Catalyst 13.0+
The destination in the document to be located.
A comparison result, indicating the position of the passed-in destination relative to the current position.
destination is between the receiver’s position and the end of the document,
NSOrdered; if it is between the receiver’s position and the beginning of the document,
NSOrdered. Otherwise, if
destination matches the receiver’s position,
This method ignores the horizontal component of the destination point (the x value). If the destination’s vertical component (or y value) is
compare treats the destination as if its y value is the top point on the destination page.
An exception is raised if
destination does not have a page associated with it or if its page is associated with a document other than the receiver’s document.