5

Possible Duplicate:
Do I always have to call [super viewDidLoad] in the -viewDidLoad method?

Why is the super class' viewDidLoad method called in every viewDidLoad? What work will it do? Is it compulsory?

Community
  • 1
  • 1
mayuur
  • 4,736
  • 4
  • 30
  • 65

1 Answers1

3

It is not compulsory, but it is good design practice. It doesn't affect direct subclasses of the UIKit classes, but if you subclass a custom class, you'll need it. All it does is call the viewDidLoad of it's superclass to perform it's configuration.

Aurum Aquila
  • 9,126
  • 4
  • 25
  • 24