<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.3.0 - 10.8.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSNib/instantiateNibWithOwner:topLevelObjects:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSNib(im)instantiateNibWithOwner:topLevelObjects:"
  },
  "title" : "instantiateNibWithOwner:topLevelObjects:"
}
-->

# instantiateNibWithOwner:topLevelObjects:

Unarchives and instantiates the in-memory contents of the receiver’s nib file, creating a distinct object tree and set of top level objects.

```
- (BOOL) instantiateNibWithOwner:(id) owner topLevelObjects:(NSArray **) topLevelObjects;
```

## Parameters

`owner`

The object to use as the owner of the nib file. If the nib file has an owner, you must specify a valid object for this parameter.

`topLevelObjects`

On input, a variable capable of holding an `NSArray` object. On output, this variable contains an autoreleased `NSArray` object containing the top-level objects from the nib file. You may specify `nil` for this parameter if you are not interested in the top-level objects.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the nib file’s contents were instantiated successfully; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

You may use this method to instantiate a nib file multiple times. This is a convenience method that composes the name-table dictionary and invokes the [`instantiateNibWithExternalNameTable:`](/documentation/AppKit/NSNib/instantiateNibWithExternalNameTable:) method, passing it the name table.

---

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)