What is the best way for a view added via presentModalViewController to communicate its dismissal with the class which invoked the call?
In one of my methods, I use presentModalViewController:animated: to popup a scoreboard where a player enters their name, then clicks OK. Everything is working fine with the scoreboard, but when I use dissmissModaleViewController I'd like a way for the class which called presentModeViewController to display an alert.
I tried to but the following in the method which called the presentModalViewController:
[self presentModalViewController:"myNib" animated:YES];
[alert show];
But the alert code runs after the presentModalViewController runs, so I assume that when presentModalViewController is called, it doesn't stop the code executing outside of it.
Anyway, I need the alert options to be handled within the class which calls the presentModalViewController, so what is the best way to go about it?