As I know, there are at least two ways to present a UIViewController on another UIViewController, first uses presentModalViewController: animated: on UIViewController, the other uses pushViewController: animated: on UINavigationController, it seems when 2 view controllers change their appearance, causing the callback to appear / disappear different. The following is an example: A is the UINavigationController, and B is the normal view controller, the actual callback sequence:
(1) A using presentModalViewController: animated: to display B:
[B viewWillAppear]; [A viewWillDisappear]; [B viewDidAppear]; [A viewDidDisappear];
(2) A using pushViewController: animated: to display B:
[A viewWillDisappear]; [B viewWillAppear]; [A viewDidDisappear]; [B viewDidAppear];
So my question is: are these different callback sequences stable, or is there no specific sequence that we can rely on? If they are stable, is there a document in the document? Can anyone help? Thanks, advanced!
source share