iphone - Do I always have to call [super viewDidLoad] in the -viewDidLoad method? -


See examples in the apple scroll, they do not call it, I always thought it should be Why should I call in any way?

If you are overriding the method then you should still call the method super. Even if the Super Class is still doing nothing to this day, Apple can change the implementation of one day and your code will stop working mysteriously if you really need to do anything in that method If not, leave it completely out of your code, and Super's method will normally run on your part without any interference.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -