<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMatrix/getRow(_:column:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMatrix(im)getRow:column:forPoint:"
  },
  "title" : "getRow(_:column:for:)"
}
-->

# getRow(_:column:for:)

Indicates whether the specified point lies within one of the cells of the matrix and returns the location of the cell within which the point lies.

```
func getRow(_ row: UnsafeMutablePointer<Int>, column col: UnsafeMutablePointer<Int>, for point: NSPoint) -> Bool
```

## Parameters

`row`

On return, the row of the cell containing the specified point.

`col`

On return, the column of the cell containing the specified point.

`point`

The point to locate; this point should be in the coordinate system of the receiver.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the point lies within one of the cells in the receiver; <doc://com.apple.documentation/documentation/Swift/false> if the point falls outside the bounds of the receiver or lies within an intercell spacing.

## Discussion

---

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)