title: iPhone: modalview not closing
body: <p>I have a function, in UpdateViewController, that is being called by a delegate, MyDownloadController, that will close a modal view (which is the UpdateViewController).</p>
  
  <pre><code>-(void)errorDownloading {
      self.downloadController.delegate = nil;
      [downloadController release];
  
      [self dismissModalViewControllerAnimated:YES];
  } 
  </code></pre>
  
  <p>I've tried doing this with and without messing with the delegate pointer and it still doesn't close the view.</p>
  
  <p>The delegate calls the method like this within MyDownloadController:</p>
  
  <pre><code>-(void)connectionError {
      if([delegate respondsToSelector:@selector(errorDownloading)]){
          [delegate errorDownloading];
      }
  }
  </code></pre>
  
  <p>And this function is called by a different delegate (MyConnectionController).</p>
  
  <p>Is there anything wrong with having this many delegates?  And would a pointer error or something with them effect the modalview being able to close?  If so, how / why?</p>
  
  <p>I have this structure for the delegations:</p>
  
  <pre><code>UpdateViewController (the actual modal view I am trying to close)
  |- MyDownloadController (the controller that abstracts the process being done)
      |- MyConnectionController (a helper class I wrote to interact with NSURLConnection)
          |- NSURLConnection
  </code></pre>
  
  <p>What is the best way to diagnose this problem?</p>