简体   繁体   中英

AlertView Should Disappear On Its Own

如何不使用任何取消按钮就使Alertview自行消失?

use this...

-(void)showAlertView
{
   // code for showing your alertView
   [self performSelector:@selector(dismissAlertView) withObject:yourObject afterDelay:5]
}

-(void)dismissAlertView
{
    [yourAlert dismissWithClickedButtonIndex:0 animated:YES];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM