Draws the interior portion of the receiver, which includes the image or text portion but does not include the border.
- macOS 10.0+
The bounding rectangle of the receiver, or a portion of the bounding rectangle.
The control that manages the cell.
NSCell objects display their contents in a rectangle slightly inset from
cell using a global
NSText object. Image-type
NSCell objects display their contents centered within
cell. If the proper attributes are set, this method also displays the dotted-line rectangle to indicate if the control is the first responder and highlights the cell. This method is invoked from the
draw method of
NSControl to visually update what the cell displays when its contents change. The drawing done by the
NSCell implementation is minimal and becomes more complex in objects such as
This method draws the cell in the currently focused view, which can be different from the
control passed in. Taking advantage of this is not recommended.
Subclasses often override this method to provide more sophisticated drawing of cell contents. Because
draw after it draws the cell's border, do not invoke
draw(with in your override implementation.