如何在不使用任何取消按钮的情况下使alertview自行消失。?
答案 0 :(得分:7)
使用此...
-(void)showAlertView
{
// code for showing your alertView
[self performSelector:@selector(dismissAlertView) withObject:yourObject afterDelay:5]
}
-(void)dismissAlertView
{
[yourAlert dismissWithClickedButtonIndex:0 animated:YES];
}