//弹框提示
UIAlertView *alert = [[UIAlertViewalloc]initWithTitle:@"提示"message:@"2秒后将消失"delegate:nil cancelButtonTitle:nilotherButtonTitles:nil];
[alertshow];
// 2秒后执行
[self performSelector:@selector(dimissAlert:)withObject:alert afterDelay:2.0];
//移除弹框
- (void) dimissAlert:(UIAlertView *)alert {
if(alert){
[alert dismissWithClickedButtonIndex:[alert cancelButtonIndex] animated:YES];
}
}
提示框自动消失
最新推荐文章于 2023-06-27 15:48:24 发布