Hi have this problem of a view that cannot be closed. I have read a lot of Q&As and I tried
[self dismissModalViewControllerAnimated:YES]
once it did not work I have tried calling the parent view:
[self.parentViewController dismissModalViewControllerAnimated:YES];
then there was a discussion on what is working on iOS 5 and later and I tried this code:
if ([self respondsToSelector:@selector(presentingViewController)]){
[self.presentingViewController dismissModalViewControllerAnimated:YES];
} else {
[self.parentViewController dismissModalViewControllerAnimated:YES];
}
The last thing I have tried was adding the following code to make the call from the main thread:
[self performSelectorOnMainThread:@selector(dismissSelf) withObject:nil waitUntilDone:NO];
Eventually, I have no solution to the problem as nothing works for me. I will be glad to see the "killer" line that makes it to work.
Thanks, Simon