Contents

tokenField(_:displayStringForRepresentedObject:)

Allows the delegate to provide a string to be displayed as a proxy for the given represented object.

Declaration

@MainActor optional func tokenField(_ tokenField: NSTokenField, displayStringForRepresentedObject representedObject: Any) -> String?

Parameters

  • tokenField:

    The token field that sent the message.

  • representedObject:

    A represented object of the token field.

Return Value

The string to be used as a proxy for representedObject. If you return nil or do not implement this method, then representedObject is displayed as the string.

See Also

Related Documentation

  • Token Field Programming Guide

Displaying Tokenized Strings