Clarification regarding viewDidAppear: and friends



Hello,

I'm a bit confused by the documentation regarding UIViewController's viewDidAppear:, viewDidDisappear:, viewWillAppear:, and viewWillDisappear:.

Consider what the documentation says for viewDidAppear:

===
viewDidAppear:

Sent to the controller after the view fully appears and animations end.

- (void)viewDidAppear:(BOOL)animated

Parameters

animated
If YES, the appearance of the view is animated; otherwise, it is not.

Discussion

The default implementation of this method does nothing. Subclasses may override this method to take an appropriate action. When doing so, they must invoke super.
===

I have 3 questions:

1) If the default implementation does nothing, why must I invoke super when overriding this method?


2) viewDidAppear: and its friends all take a boolean argument but I don't understand what it's for. In the case of viewDidAppear:, for instance, the view has already been fully displayed, so what animations is the description above talking about? Note, for instance, that the description explicitly says

"Sent to the controller after the view fully appears and animations end."

So, again, if the animations have ended, what's the boolean argument for?


3) The documentation for each of those methods says:

"Subclasses may override this method to take an appropriate action. When doing so, they must invoke super."

Now, should I invoke super before or after my custom code?


I will send a documentation enhancement request, but I thought I'd check with the list first to make sure I'm not missing something obvious.

Thanks in advance.
Wagner
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-...

admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx



Privacy