tags:

views:

45

answers:

1

Hi,

I am writing an application(for iPhone) that uses the UINavigationController to show different view via pushViewController. I am trying to push multiple UIViewController immediately upon application startup without user interaction. When an user open up the application, they will be looking on a screen with a navigation bar on the top that already have a back button.

The problem I am experiencing is that viewWillDisappear and viewDidDisappear of a ViewController does not always get call if another ViewController is pushed on top of it immediately upon application start up without user interaction. If the ViewController being pushed on top is activate by the user with a button click, then viewWillDisappear and viewDidDisappear of the view being cover always get call.

Note. viewWillAppear and viewDidAppear of the covered view controller always get called.

In the code that is experiencing the problem, I am pushing the new view controller in viewDidAppear of the previous ViewController.

Anyone know what I might be doing wrong or if the behavior I am seeing is expected?

A: 

The problem I am experiencing is that viewWillDisappear and viewDidDisappear of a ViewController does not always get call if another ViewController is pushed on top of it immediately upon application start up without user interaction.

Sound pretty sensible to me. After all, the "covered" view never appeared on screen, so it cannot disappear. I would expect this behavior.

Ole Begemann
viewWillAppear and viewDidAppear of the covered view controller were always executed, so I expected viewWillDisappear and viewDidDisappear to be called as well. Is it something that I set that cause viewWillAppear/viewDidAppear to be called when it shouldnt of?
Klu