Deprecated NSNib Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in OS X v10.8

initWithContentsOfURL:

Returns an NSNib object initialized to the nib file at the specified URL. (Deprecated in OS X v10.8. Use initWithNibData:bundle: and specify a bundle for locating images and other resources.)

- (id)initWithContentsOfURL:(NSURL *)nibFileURL
Parameters
nibFileURL

The location of the nib file.

Return Value

The initialized NSNib object or nil if there were errors during initialization or the nib file could not be located.

Discussion

When you instantiate the nib objects later, the NSNib object looks for an appropriate bundle from which to search for any additional resources referenced by the nib. Because you do not specify a bundle directory when calling this method, the receiver uses the bundle associated with the class of the nib file’s owner. If the nib file does not have an owner, the receiver uses the application’s main bundle instead.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.8.
Declared In
NSNib.h

instantiateNibWithExternalNameTable:

Unarchives and instantiates the in-memory contents of the receiver's nib file, creating a distinct object tree and top level objects. (Deprecated in OS X v10.8. Use instantiateWithOwner:topLevelObjects: instead.)

- (BOOL)instantiateNibWithExternalNameTable:(NSDictionary *)externalNameTable
Parameters
externalNameTable

A dictionary containing entries for the nib file's owner and top-level objects. See the discussion for more information.

Return Value

YES if the nib file's contents were instantiated successfully; otherwise, NO.

Discussion

This is the primitive method for performing instantiations of a nib file. You may use this method to instantiate a nib file multiple times. Each instantiation of the nib must have a distinct owner object that is responsible for the resulting object tree.

If the nib file requires an owner, the externalNameTable parameter must contain the object representing the nib file’s owner (associated with the NSNibOwner key). The parameter may optionally include an NSMutableArray object to be populated with the top-level objects nib file (associated with the NSNibTopLevelObjects key).

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.8.
Declared In
NSNib.h

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. (Deprecated in OS X v10.8. Use instantiateWithOwner:topLevelObjects: instead.)

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

YES if the nib file's contents were instantiated successfully; otherwise, NO.

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.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
NSNib.h