init(range:affinity:granularity:)
Creates a new text selection with the range, selection affinity, and granularity you provide.
Declaration
convenience init(range: NSTextRange, affinity: NSTextSelection.Affinity, granularity: NSTextSelection.Granularity)Parameters
- range:
The range of the selection.
- affinity:
One of the available Affinity Swift.enum options.
- granularity:
One of the available Granularity Swift.enum options.