iphone - Is there a way to dismiss an no button UIalertView after some time? -
uialertview *alertview = [[uialertview alloc] initwithtitle:@"tittle" message:@"" delegate:self cancelbuttontitle:@"" otherbuttontitles:nil]; [alertview show]; [alertview release];
i want dimiss alerview after it's showing time,but when alertview has no button,it doesn't work if invoked -dismisswithclickedbuttonindex:animated: method
and-performselector:withobject:afterdelay:
there other way dismiss ? ideas!
-(void)xx { [self performselector:@selector(dismissalertview:) withobject:alertview afterdelay:2]; } -(void)dismissalertview:(uialertview *)alertview{ [alertview dismisswithclickedbuttonindex:0 animated:yes]; }
that's it.i fix it
Comments
Post a Comment