您的位置:首页 > 移动开发 > IOS开发

[ios]让alertView 自动消失【转】

2013-03-14 23:05 405 查看
self.myalert=[[UIAlertView alloc] initWithTitle:@"提示" message:@"该数据删除成功" delegate:self cancelButtonTitle:nil otherButtonTitles: nil];

[NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(performDismiss:) userInfo:nil repeats:NO];
[self.myalert show];

-(void)performDismiss:(NSTimer*)timer

{

[self.myalert dismissWithClickedButtonIndex:0 animated:NO];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: