init(_:affinity:)
Creates a new text selection with the location and selection affinity you provide.
Declaration
convenience init(_ location: any NSTextLocation, affinity: NSTextSelection.Affinity)Parameters
- location:
The text location
- affinity:
One of the possible Affinity Swift.enum options.