I have a multiple Nib application, and in my awakeFromNib: method, some IBOutlets are nil.
I think I have narrowed down the problem, but I’m not sure why. I have a MainWindow.xib file, that was created by Xcode. In there, I have the application delegate, and several view controllers (one per each other Nib I have). Let’s call one of them the MatrixViewController.
I also have a MatrixView.xib file, where I have the controller and the view. What I want to do is from MatrixViewController‘s awakeFromNib initialize something from its view. However, all the outlets in it are nil.
I think this is because the awakeFromNib: I’m responding to was sent when loading MainWindow.xib and not MatrixView.xib, am I correct?
What is the alternative to solve this? One good thing about it, is that all the initialization is done when the application loads, which I’d like to keep.
Use
-viewDidLoadinstead of-awakeFromNibIt’s one of those iPhone vs MacOSX differences.