Calling [super loadView]
will cause the UIViewController
implementation of loadView
to run. Among other things, this is the method that loads a view from a NIB, if a nibName
has been provided. So if you were to call super last, it might overwrite all the view setup you did in your own subclass. If you call super first, this wouldn't be a problem... unless you have any code in -awakeFromNib
or something.
Basically, you shouldn't call super
because if you're loading your view programmatically, none of the work done in the superclass is work you want to keep. At best, you're throwing away a bunch of work. At worst, UIViewController
may set up some state in there that makes assumptions about the origin of the view.
You don't need it, so don't do it.
[super loadView]
first, to make sure the superview is there, and then add your own subviews (assuming IB isn't being used) – Dennie