0

I'm writing a navigation based app. (it has modal segues too) I'm not sure if I should keep [super viewDidLoad]; call or not. should I write code after this line of code or before it? how about [super viewDidUnload]; and similars?

Milad
  • 1,239
  • 3
  • 19
  • 37
  • possible duplicate of [Do I always have to call \[super viewDidLoad\] in the -viewDidLoad method?](http://stackoverflow.com/questions/824695/do-i-always-have-to-call-super-viewdidload-in-the-viewdidload-method), http://stackoverflow.com/questions/844195/super-viewdidload-convention?lq=1, http://stackoverflow.com/questions/7730345/do-i-need-to-call-super-viewdidunload?lq=1, http://stackoverflow.com/questions/4708710/iphone-viewdidload?lq=1 – jscs Jul 07 '12 at 08:12

1 Answers1

0

You don't have to; according to the documentation, it's a stub function, so it doesn't do anything useful in non-subclasses.


Moral: always read the docs.

  • 1
    Ah, but the docs _also_ say that you should call it. See Paul Tomblin's and Steven Fisher's concerns at the duplicate question: http://stackoverflow.com/questions/824695/do-i-always-have-to-call-super-viewdidload-in-the-viewdidload-method – jscs Jul 07 '12 at 17:45
  • Well, I remember when I read them last time, therewas something exceptional in the docs and *this* was it, indeed. Maybe the documentation has been changed since then. –  Jul 07 '12 at 20:26