Notifications
Since you mentioned two .xib files in your project I assume that you need to communicate between two .xibs. You can't establish a connection between two of these files using IBOutlets, etc. The way to do this is to use notifications. For example in the object methods of the first .xibs file owner, when the window is closed post a notification:
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc postNotificationName: @"firstWindowHasClosed" object: nil]; //post notification so other window knows to open
And in the other file owner object that controls the other window:
- (id) init //override class init so you can register it as an observer
{
if(self = [super init]) {
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver: self selector: @selector(openNewWindow: ) name: @"firstWindowHasClosed" object: nil];
Then when your first window posts the notification the second object receives the notification and calls the openNewWindow method. Be sure to call:
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc removeObserver: self];
in the object's dealloc method.