Contents

selectionRange(forProposedRange:granularity:)

Returns an adjusted selected range based on the selection granularity.

Declaration

func selectionRange(forProposedRange proposedCharRange: NSRange, granularity: NSSelectionGranularity) -> NSRange

Parameters

  • proposedCharRange:

    The proposed selected range.

  • granularity:

    The selection granularity.

Return Value

The adjusted selected range, taking into account the selection granularity.

Discussion

This method is invoked repeatedly during mouse tracking to modify the range of the selection. Override this method to specialize selection behavior.

See Also

Related Documentation

Customizing subclass behaviors