Blocking Execution, until Confirmation AlertView is dismissed by user, and returning result
<p>How can I make my delegate method wait until the user makes a choice to the alertview confirmation?</p>

<pre><code>BOOL userChoice = FALSE;
</code></pre>

<p>I have this delegate method:</p>

<pre><code>-(BOOL) returnUserChoiceYESorNO:(NSString*)message { //delegate method

UIAlertView *msgBox = [[UIAlertView alloc] initWithTitle:@"Your Choice" message:message delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK",nil]; 
    [msgBox show]; 
    [msgBox release];

//// HOW CAN I MAKE IT WAIT HERE, UNTIL I RECEIVE USER Responce from ClickedButtonAtIndex?  (without using while loop or infinite loops)

return userChoice;


}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{

if(buttonIndex==0) {
userChoice = NO;
else
{
userChoice = YES;
}

}
</code></pre>
