affinity
Returns the selection affinity of the text selection.
Declaration
var affinity: NSTextSelection.Affinity { get }Discussion
The affinity is NSTextSelection.Affinity.downstream by default. For a zero-length selection, it describes the visual location of the text cursor between the head of line containing the selection location (downstream) or tail of the previous line (upstream). For a selection with contents, it describes the logical direction of non-anchored edge of the selection.