Contents

NSCell

A mechanism for displaying text or images in a view object without the overhead of a full Nsview subclass.

Declaration

@MainActor class NSCell

Overview

Cells are used by most of the NSControl classes to implement their internal workings.

Designated Initializers

When subclassing NSCell you must implement all of the designated initializers. Those methods include init(), init(coder:), init(textCell:), and init(imageCell:).

Topics

Initializing a Cell

Managing Cell Values

Managing Cell Attributes

Managing Display Attributes

Managing Cell State

Modifying Textual Attributes

Managing the Target and Action

Managing the Image

Managing the Tag

Formatting and Validating Data

Managing Menus

Comparing Cells

Respond to Keyboard Events

Deriving Values

Representing an Object

Tracking the Mouse

Hit Testing

Managing the Cursor

Handling Keyboard Alternatives

Dragging Cells

Managing Focus Rings

Determining Cell Size

Drawing and Highlighting

Editing and Selecting Text

Managing Expansion Frames

User Interface Layout Direction

Constants

Notifications

Initializers

See Also

View fundamentals