ios定时自动退出UIAlertView提示框
来源:互联网 发布:最知女人心 编辑:程序博客网 时间:2024/05/22 12:36
今天想在应用里加个自动退出提示框的功能,在网上没找到好的方法,所以自己用定时器做了一个,跟大家分享下,如果有其他更好的方法麻烦提示一下。
//对话框的创建和定时器的初始化
alertView = [[UIAlertView alloc] initWithTitle:@"Result" message:@"Share Success" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
[alertView show];
NSTimer *timer = [[NSTimer timerWithTimeInterval:3 target:self selector:@selector(onTimer) userInfo:nil repeats:NO] retain];
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
[timer release];
//timer的执行事件
- (void)onTimer
{
[alertView dismissWithClickedButtonIndex:0 animated:NO]; //退出对话框
}
- ios定时自动退出UIAlertView提示框
- UIAlertView提示框自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- ios:UIAlertView自动消失
- IOS提示控件UIActionSheet,UIAlertView
- IOS提示控件UIActionSheet,UIAlertView
- UIAlertView(提示框)
- 提示框UIAlertView
- iOS 创建UIAlertView可输入内容提示框
- 【代码笔记】iOS-UIAlertView自动关闭
- iOS自动消失提示框
- 自动关闭UIAlertView弹出框
- extjs4 combobox学习之可以用来查询的combo
- Spring Form Tags
- 利用Squid搭建透明代理网关服务器
- csdn太不给力了
- Fedora 15 SSH安装与配置
- ios定时自动退出UIAlertView提示框
- Fedora下搭建FTP服务器-VSFTP
- iOS程序退出的时候不执行dealloc函数的疑惑
- 用Python写一个小小的爬虫程序
- 一次PEDIY---修改Windows自带的calc.exe (Unable to read memory of debugged process......”错误提示)
- Google code android开源项目(二)
- 二〇一一,我的失败与伟大
- Ubuntu 开机自动挂载NTFS分区
- 在WPF中,如何得到任何Object对象的XAML代码?_.Net实例_电脑学网...