Melodius
Melodius

Reputation: 2785

Swift IBOutlets are nil in awakeFromNib (xcode 6.1.1 osx 10.10.1)

I have a NSViewController (I'm using a storyboard) with one iboutlet connected to a NSOutlineView (yes, I have made absolutely shure that it really is connected), but when I try to reference it in awakeFromNib, the outlet is still nil although they should be guaranteed to be connected in awakeFromNib. Any ideas or solutions?

Upvotes: 2

Views: 715

Answers (1)

Marius Fanu
Marius Fanu

Reputation: 6669

The Apple documentation says that the lifecycle of a NSViewController starts with viewDidLoad, so you should do your stuff there. enter image description here

Upvotes: 3

Related Questions