---
title: "drawLabel(_:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstabviewitem/drawlabel(_:in:)"
---

# drawLabel(_:in:)

Draws the receiver’s label in tabRect, which is the area between the curved end caps.

## Declaration

```swift
func drawLabel(_ shouldTruncateLabel: Bool, in labelRect: NSRect)
```

## Discussion

Discussion If shouldTruncateLabel is false, draws the full label in the rectangle specified by tabRect. If shouldTruncateLabel is true, draws the truncated label. You can override this method to perform customized label drawing. For example, you might want to add an icon to each tab in the view.

## See Also

### Working with Labels

- [label](appkit/nstabviewitem/label.md)
- [sizeOfLabel(_:)](appkit/nstabviewitem/sizeoflabel(_:).md)
