NSTokenField is a subclass of NSTextField that provides tokenized editing similar to the address field in the Mail application.


NSTokenField uses an NSTokenFieldCell to implement much of the control’s functionality. NSTokenField provides cover methods for most methods of NSTokenFieldCell, which invoke the corresponding cell method.

Nested Types


The NSTokenStyle constants define how tokens are displayed and editable in the NSTokenFieldCell. These values are used by tokenStyle and the delegate method tokenFieldCell(_:styleForRepresentedObject:).


Configuring the Token Style

var tokenStyle: NSTokenStyle

The token style of the receiver.

Configuring the Tokenizing Character Set

var tokenizingCharacterSet: CharacterSet!

The recevier’s tokenizing character set to characterSet.

class func defaultTokenizingCharacterSet()

Returns the default tokenizing character set.

Configuring the Completion Delay

var completionDelay: TimeInterval

The receiver’s completion delay.

class func defaultCompletionDelay()

Returns the default completion delay.

Getting and Setting the Delegate

var delegate: NSTokenFieldDelegate?

Returns the token field’s delegate.


Inherits From