Jacobo Koenig
Jacobo Koenig

Reputation: 12534

How to know if my non-ViewController class has loaded (like viewDidLoad)

I am sure this is an amateur question, but I am starting to develop in osx, and I created an NSTableView that consists of two classes. One is the VC where it lives, and the other one is a 'TableHelper' class that sets it up.

Since the TableHelper class is the delegate and dataSource of my table, I want to be able to set some things up before it loads (like a viewDidLoad method) is there an equivalent for this NSObject, NSTableViewDelegate/DataSource class?

Upvotes: 1

Views: 52

Answers (1)

Phillip Mills
Phillip Mills

Reputation: 31026

It depends on whether your table helper is created in code or in a storyboard/xib.

If code, then there's no delayed loading; it exists when you create it. If storyboard/xib, then you're looking for the awakeFromNib method.

Upvotes: 1

Related Questions