views:

1483

answers:

1

Is there a way to know when the dismissModalViewControllerAnimated is initiated and when it is completed (such as the idiom for viewWillAppear and viewDidAppear)? Unlike other animations, this one doesn't seem to have a delegate that tells you.

+1  A: 

Yes, and easier than you think.

When dismissModalViewControllerAnimated: is called, the underlying view (the one about to appear) will receive a viewWillAppear message and a viewDidAppear message.

Caveat: make sure your view controllers are hooked up properly or these messages get lost.

Corey Floyd
Thanks, my delegate signature was wrong so I thought it wasn't called when dismiss is done.
Boon
What does this delegate signature look like?
AlvinfromDiaspar
I have both viewDidAppear and viewDidAppear implemented. but when the modalviewcontroll is called (as a partial-curlup style), these delegates arent called. any ideas?
AlvinfromDiaspar