UIAlertView Dismiss Not Really Dismissed
Posted
by Jim Bonner
on Stack Overflow
See other posts from Stack Overflow
or by Jim Bonner
Published on 2010-04-26T16:20:27Z
Indexed on
2010/04/26
16:23 UTC
Read the original article
Hit count: 566
Below is the code I'm using to do a retry on an FBConnect session. When the [self loginToFaceBook] fires FBConnect adds a subview to 'window' which is still the UIAlert view, so when the UIAlert really dismisses it takes the FBConnect view with it. Any idea as to the best way to wait for the UIAlert view to be gone.
-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if([self respondsToSelector:@selector(alertContinue)]) {
[self alertContinue];
}
}
-(void)alertContinue
{
SocialLiteAppDelegate *appDelegate = (SocialLiteAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.fbSession logout];
[self loginToFaceBook];
}
© Stack Overflow or respective owner