title: iPad: presenting a modal view and my parentViewController is now nil?
body: <p>I have a couple of modal views that have been working "just fine" and now stopped returning to the parent view controller and "the code has not changed."  -- classic problem description.</p>
  
  <p>I debugged the modal view dismissing and the parent view controller is nil, which explains the problem, but not the cause.  I did upgrade my SDK from 4.1.2 to 4.2 so I can start working with iOS 5.  I am suspect of the new memory management ARC and my style of autorelease versus retain/release.</p>
  
  <p>Following is the code from my rootview controller to the AboutViewController:</p>
  
  <pre><code>- (IBAction)doInfo:(id)sender {
      NSLog(@"%s", __FUNCTION__);
      AboutViewController *aboutViewController = [[[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:[NSBundle mainBundle]] autorelease];
      if (aboutViewController) {
          aboutViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
          aboutViewController.hidesBottomBarWhenPushed = YES;
          self.navigationController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
          self.navigationController.navigationBarHidden = YES;
          [self presentModalViewController:aboutViewController animated:YES];
      }
  }
  </code></pre>
  
  <p>Following is the dismiss in the AboutViewController back to its parent after pressing a "Done" button.</p>
  
  <pre><code>- (IBAction)doDone:(id)sender {
      NSLog(@"%s", __FUNCTION__);
      [[self parentViewController] dismissModalViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>OK ... I fixed by changing as follows.  Now the question is why did this work before?</p>
  
  <pre><code>- (IBAction)doDone:(id)sender {
      NSLog(@"%s", __FUNCTION__);
      [self dismissModalViewControllerAnimated:YES];
  }
  </code></pre>