Retired Documents Library

Developer

NSNibConnector Class Reference

Options
Deployment Target:

On This Page

NSNibConnector

This class represents a basic connection in Interface Builder. You should not use this class directly. If you need to work with nib connections, you would use a subclass like NSNibControlConnector or NSNibOutletConnector instead. If you want to create your own type of connectors, you can also define your own custom subclasses.

  • Returns the connector’s source.

    Declaration

    @property(assign) id source

    Return Value

    The object that is the source of the connection.

    Availability

    Available in OS X v10.0 and later.

  • Sets the connector’s source to the specified object.

    Declaration

    @property(assign) id source

    Parameters

    source

    The object that is the source of the connection.

    Availability

    Available in OS X v10.0 and later.

  • Returns the connector’s destination.

    Declaration

    @property(assign) id destination

    Return Value

    The object that is the destination of the connection.

    Availability

    Available in OS X v10.0 and later.

  • Sets the connector’s destination to destination.

    Declaration

    @property(assign) id destination

    Parameters

    destination

    The object that is the destination of the connection.

    Availability

    Available in OS X v10.0 and later.

  • Establishes a connection between the source and destination object.

    Declaration

    - (void)establishConnection

    Discussion

    The default implementation of this method does nothing. Subclasses must override it to establish a connection between the source and destination objects. The current label provides the description of how the two objects are connected and can be interpreted differently by different subclasses. This method is called for each connection whenever an application opens a nib file.

    Availability

    Available in OS X v10.0 and later.

  • Changes the connection’s source or destination object to the specified object.

    Declaration

    - (void)replaceObject:(id)oldObject withObject:(id)newObject

    Parameters

    oldObject

    The object you want to replace. This object can be either the current source object or the current destination object.

    newObject

    The replacement object.

    Discussion

    If the object in oldObject is not used for either the source or destination of this connection, this method does nothing.

    Availability

    Available in OS X v10.0 and later.

  • Returns the label associated with the connection.

    Declaration

    @property(copy) NSString *label

    Return Value

    A string containing information about the type of connection. This value can be interpreted differently by different subclasses. For example, the NSNibControlConnector interprets this string as the selector to call as an action method.

    Availability

    Available in OS X v10.0 and later.

  • Sets the label for the connection.

    Declaration

    @property(copy) NSString *label

    Parameters

    label

    A string containing information about the type of connection. This value can be interpreted differently by different subclasses. For example, the NSNibControlConnector interprets this string as the selector to call as an action method.

    Availability

    Available in OS X v10.0 and later.