---
title: "setKeyboardFocusRingNeedsDisplay(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/setkeyboardfocusringneedsdisplay(_:)"
---

# setKeyboardFocusRingNeedsDisplay(_:)

Invalidates the area around the focus ring.

## Declaration

```swift
func setKeyboardFocusRingNeedsDisplay(_ rect: NSRect)
```

## Parameters

- `rect`: The rectangle of the control or cell defining the area around the focus ring. rect will be expanded to include the focus ring for invalidation.

## See Also

### Drawing the Focus Ring

- [focusRingType](appkit/nsview/focusringtype.md)
- [focusRingMaskBounds](appkit/nsview/focusringmaskbounds.md)
- [drawFocusRingMask()](appkit/nsview/drawfocusringmask().md)
- [noteFocusRingMaskChanged()](appkit/nsview/notefocusringmaskchanged().md)
- [defaultFocusRingType](appkit/nsview/defaultfocusringtype.md)
