---
title: "noteSelectedAlternativeString(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextalternatives/noteselectedalternativestring(_:)"
---

# noteSelectedAlternativeString(_:)

Sent to the NSTextAlternatives object by the text view when the user chooses one of the alternative strings.

## Declaration

```swift
func noteSelectedAlternativeString(_ alternativeString: String)
```

## Parameters

- `alternativeString`: The alternative string chosen by the user.

## Discussion

Discussion The base class implementation sends a notification, NSTextAlternativesSelectedAlternativeStringNotification, with the selected alternative string in the user info under the key @"NSAlternativeString". Using this mechanism, arbitrary objects can listen for user selections of alternative strings.
