the situation is like this :
if i dont have internet connection, i show alertview to the user. when the user press "try again", i call "dosomething".
the problem is the alertview still show for seconds..after the user click "try again"
i tried : [self.view setNeedsDisplay];
but, in not works, cause even in the documents..if said the refresh will be only when code control will return to the system, and that is not the case here.
thanking in advance.
/////////////////////////////////// if(somecondition) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"NO INTERNET CONNECTION" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Try Again", nil];
[alert show];
[alert release];
return;
}
(void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { // the user clicked one of the OK/Cancel buttons
[self DoSomthing];
} /////////////////////////