Is there a good overview of initWithNibName
, awakeFromNib
, and viewDidLoad
that lays out the best way to use each of these and describes exactly what each does? I find these very confusing. In the template that's generated with a View Controller, the comment about initWithNibName
says:
The designated initializer. Override to perform setup that is required before the view is loaded.
Except that this method never seems to be called (I'm using IB to set up the View Controller). So should I use awakeFromNib
or viewDidLoad
to initialize instead?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…