A reader writes:
When calling
dismissModalViewControllerAnimated:
in 4.2, theviewWillAppear
method of the view about to appear will fire before theviewWillDisappear
method 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.)