Contents

tokenField(_:representedObjectForEditing:)

Allows the delegate to provide a represented object for the given editing string.

Declaration

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

Parameters

  • tokenField:

    The token field that sent the message.

  • editingString:

    The edited string representation of a represented object.

Return Value

A represented object that is displayed rather than the editing string.

Discussion

If your application uses some object other than an NSString for their represented objects, you should return a new, autoreleased instance of that object from this method.

See Also

Editing a Tokenized Strings