[sorry for my weak english]
The question is simple (but I have troubles in expressing it and finding it in google)...
Should I (in all similar cases, when I override the super method, not only this one) use:
- (void)viewDidLoad
{
/*
my code
*/
[super viewDidLoad];
}
or
- (void)viewDidLoad
{
[super viewDidLoad];
/*
my code
*/
}
or does it depend?
in some cases the order will not matter. in others, order is critical.
some generalizations which will help:
viewDidLoad and init...), call through super first.viewDidUnload or dealloc), call through super last.super first for easier organization.It depends on the method; e.g. -[super init] (before) vs -[super dealloc] (after).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With