Reputation: 695
How to make the alertview disappear on its own without using any cancel buttons.?
Upvotes: 0
Views: 308
Reputation: 15628
use this...
-(void)showAlertView
{
// code for showing your alertView
[self performSelector:@selector(dismissAlertView) withObject:yourObject afterDelay:5]
}
-(void)dismissAlertView
{
[yourAlert dismissWithClickedButtonIndex:0 animated:YES];
}
Upvotes: 7