Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

awakeFromNib is not called in my ViewController

Tags:

iphone

I have a view controller that is created via initWithNibName, and I just found out awakeFromNib is not called. Is awakeFromNib only called when the view controller is unarchived from the Nib? (that is, initWithCoder is called)

like image 466
Boon Avatar asked Jun 03 '09 09:06

Boon


1 Answers

I think what you're looking for is viewDidLoad. awakeFromNib is only called on objects that are loaded from the nib. The controller itself receives viewDidLoad:. Since you're calling initWithNibName:bundle:, it's not actually unarchived from the nib!

like image 117
Ben Gotow Avatar answered Sep 21 '22 10:09

Ben Gotow