views:

29

answers:

1

In the function viewDidUnload it is initially empty. However, I'm following a tutorial where at the end of the function they write [super viewDidUnload]. I noticed that in the dealloc function, [super dealloc] is automatically written at the end. Why isn't it automatically written at the end of viewDidUnload? Does it make a difference? What does it do?

Also, is this a Cocoa question, or an Objective-C question?

+2  A: 

This link may help: http://stackoverflow.com/questions/2365440/iphone-super-viewdidunload-calling-order

Basically, if the superclass is just UIViewController, [UIViewController viewDidUnload] does nothing, so that's why it's not automatically added.

Kurbz