A reader writes:
dismissModalViewControllerAnimated:in 4.2, the
viewWillAppearmethod of the view about to appear will fire before the
viewWillDisappearmethod of the view you are dismissing.
He’s right. In fact, I’ve tested this back to iOS 3.1.3 on a 3G, and the behavior is consistently as described. So, if you’re writing code for which the order of invocation of these methods matters, be careful. (Actually, it might be better to make your code insensitive to this ordering, since I don’t see anything in the documentation which guarantees one behavior or the other.)