Contents

tokenFieldCell(_:representedObjectForEditing:)

Allows the delegate to provide a represented object for the string being edited.

Declaration

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

Parameters

  • tokenFieldCell:

    The token field cell 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