<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPathCell/rect(of:withFrame:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPathCell(im)rectOfPathComponentCell:withFrame:inView:"
  },
  "title" : "rect(of:withFrame:in:)"
}
-->

# rect(of:withFrame:in:)

Returns the current rectangle being displayed for a given path component cell, with respect to a given frame in a given view.

```
func rect(of cell: NSPathComponentCell, withFrame frame: NSRect, in view: NSView) -> NSRect
```

## Parameters

`cell`

The path component cell.

`frame`

The frame of the view in which the cell appears.

`view`

The view in which the cell appears.

## Return Value

The rectangle occupied by the path component cell. `NSZeroRect` is returned if `cell` is not found or is not currently visible.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)