title: viewDidAppear: called when using presentViewController:animated:completion:
body: <p>I have a view controller which queries a web service as to whether an interstitial ad should be shown. If so, another view controller is instantiated and presented using presentViewController:animated:completion:. According to <a href="https://stackoverflow.com/questions/9621346/viewdiddisappear-not-called-when-use-presentviewcontroller">this answer</a> and the <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html" rel="nofollow noreferrer">docs</a>, I would assume viewDidAppear: would not be called when dismissing the presented view controller (which it does itself). Conceptually, to me anyway, the presenting view controller's view is never removed from the view hierarchy and therefore never needs to "reappear". I'm obviously wrong. So what is going on? Why is what I'm seeing differing from what the docs say?</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
  
      [[AdService sharedAdService] adForSlotName:@"Main Interstitial" completionBlock:^(Ad *adForSlotName) {
  
          if(adForSlotName)
          {
              InterstitialAdViewController_iPhone *interstitialAdViewController = [[InterstitialAdViewController_iPhone alloc] init];
              interstitialAdViewController.ad = adForSlotName;
  
              dispatch_queue_t mainQueue = dispatch_get_main_queue();
              dispatch_async(mainQueue, ^{
  
                  [self presentViewController:interstitialAdViewController animated:YES completion:^{}];
  
              });
  
              [interstitialAdViewController release];
          }
      }];
  }
  
  - (void)viewWillDisappear:(BOOL)animated
  {
      [[AdService sharedAdService] clearAdForSlotName:@"Main Interstitial"];
  
      [super viewWillDisappear:animated];
  }
  </code></pre>