<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGridView/init(views:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSGridView(cm)gridViewWithViews:"
  },
  "title" : "init(views:)"
}
-->

# init(views:)

Creates a newly allocated grid view object with the specified array of arrays of views.

```
convenience init(views rows: [[NSView]])
```

## Parameters

`rows`

An array of arrays of grid view row objects.

## Discussion

This method creates an autoreleased grid view large enough to hold the passed array of rows. Each element in the array is itself an array of views for that row.

---

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)