Mac Developer Library

Developer

AppKit Framework Reference NSTokenField Class Reference

Options
Deployment Target:

On This Page
Language:

NSTokenField

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

Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.4 and later.
  • Returns the token style of the receiver.

    Declaration

    Swift

    var tokenStyle: NSTokenStyle

    Objective-C

    @property NSTokenStyle tokenStyle

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

    See Also

    – tokenStyle

  • Returns the receiver’s token style.

    Declaration

    Swift

    var tokenStyle: NSTokenStyle

    Objective-C

    @property NSTokenStyle tokenStyle

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.4 and later.

  • Returns the token field’s delegate.

    Declaration

    Swift

    func delegate() -> NSTokenFieldDelegate?

    Objective-C

    - (id<NSTokenFieldDelegate>)delegate

    Return Value

    The token field’s delegate

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.6 and later.

  • Sets the token field’s delegate

    Declaration

    Swift

    func setDelegate(_ anObject: NSTokenFieldDelegate?)

    Objective-C

    - (void)setDelegate:(id<NSTokenFieldDelegate>)anObject

    Parameters

    anObject

    The delegate for the receiver. The delegate must conform to the NSTokenFieldDelegate Protocol protocol.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.6 and later.

    See Also

    – delegate