Isn't it better to create the subview hierarchy in -viewDidLoad rather than in -loadView?

Posted by dontWatchMyProfile on Stack Overflow See other posts from Stack Overflow or by dontWatchMyProfile
Published on 2010-06-15T20:20:27Z Indexed on 2010/06/15 20:22 UTC
Read the original article Hit count: 266

Filed under:
|

The docs say that the whole subview hierarchy can be created in -loadView. But there's also this -viewDidLoad method which sounds nice to ovewrite for actually building the hierarchy, when the view loaded. I guess it's a matter of taste only. But maybe doing so in -viewDidLoad hast the advantage that the view controller already adjusted the frame of the view correctly to accomodate for the status bar or any other kind of bar like tab bar or tool bar?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiviewcontroller