This method is used to called a method of the super class, parent of current using class.
For example if we have a class called MyTest , which inherits from UIViewController, we will have in .h file something like this.
- #import <UIKit/UIKit.h>
- @interface MyTest : UIViewController {
- }
And one of the execution-cycle methods could be
- - (void)viewDidLoad {
- [super viewDidLoad];
- }
And why we have to call the same method inside the parent class? Because we have to instantiate and perform all the instructions to declare and continue with execution-cycle inside UIViewController, our parent super class.
One must-know thing, is that the order of this call inside of viewDidLoad is not the same , when calling constructors or initializations "[super]" methods must be at the top of the implementation, because the first thing to do is the initialization of the parent class.
When using destructors, like dealloc method, "[super]" should be at the bottom of the implementation, because we need to free all our objects, and at last, free the parent super class.