<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAccessibility-swift.struct/screenRect(fromView:rect:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@F@NSAccessibilityFrameInView"
  },
  "title" : "screenRect(fromView:rect:)"
}
-->

# screenRect(fromView:rect:)

Returns the frame in screen coordinates.

```
static func screenRect(fromView parentView: NSView, rect frame: NSRect) -> NSRect
```

## Discussion

Given a frame in the specified view’s coordinates, it returns the same frame in the screen’s coordinates.

---

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)