自动消失的提示框
作者:
Cy_Star | 来源:发表于
2018-01-09 10:07 被阅读38次UIAlertController * alert = [UIAlertController alertControllerWithTitle:string message:nil preferredStyle:UIAlertControllerStyleAlert];
[self presentViewController:alert animated:NO completion:nil];
[NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(creatAlert:) userInfo:alert repeats:NO];
- (void)creatAlert:(NSTimer *)timer{
UIAlertController *alert = [timer userInfo];
[alert dismissViewControllerAnimated:YES completion:nil];
alert = nil;
}
本文标题:自动消失的提示框
本文链接:https://www.haomeiwen.com/subject/izkwnxtx.html
网友评论