---
title: "instantiateNibWithOwner:topLevelObjects:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsnib/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.

## Declaration

```occ
- (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

Return Value true if the nib file’s contents were instantiated successfully; otherwise, false.

## Discussion

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: method, passing it the name table.

## See Also

### Instantiating a Nib

- [instantiateNibWithExternalNameTable:](appkit/nsnib/instantiatenibwithexternalnametable:.md)
- [instantiate(withOwner:topLevelObjects:)](appkit/nsnib/instantiate(withowner:toplevelobjects:).md)
