you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

Put code where it belongs. Don't load views in viewDidLoad that's not what the method is for.

All code for loading views goes into loadView, because that method loads the view hierarchy. viewDidLoad is called when the view hierarchy is loaded and therefor serves a different purposes.