I have a function, in UpdateViewController, that is being called by a delegate, MyDownloadController, that will close a modal view (which is the UpdateViewController).
-(void)errorDownloading {
self.downloadController.delegate = nil;
[downloadController release];
[self dismissModalViewControllerAnimated:YES];
}
I've tried doing this with and without messing with the delegate pointer and it still doesn't close the view.
The delegate calls the method like this within MyDownloadController:
-(void)connectionError {
if([delegate respondsToSelector:@selector(errorDownloading)]){
[delegate errorDownloading];
}
}
And this function is called by a different delegate (MyConnectionController).
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?
I have this structure for the delegations:
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
What is the best way to diagnose this problem?