views:

51

answers:

1

I have a navigationController and 3 View controllers. VC1 pushes VC2 and VC2 uses PresentModalViewController to display the 3rd VC

  1. When VC2 uses presentModalViewController to show VC3, is the VC3 actually pushed on the navigationcontroller stack?
  2. viewdidload of VC3 is called only 1st time. My goal is to show VC3 with a new imageView everytime. Where do I add the code to do that? viewdidappear and viewwillappear of VC3 is not fired either
A: 
  1. It is my understanding that VC3 will be in the view hierarchy of VC2 and not the navigationController. In order to be added to the view hierarchy of the navigationController you would have to push VC3 onto it.

  2. viewDidLoad should only be called once, unless the nib file itself was unloaded from memory, due to low memory. The documentation states that viewWillAppear and viewDidAppear should be called on VC3, so I don't know why they are not.

Update

I just tested and VC3 does have -(void)viewDidAppear:(BOOL)animated called. Make sure that the signature on the selector is correct

Brandon Bodnár