自动消失对话框
来源:互联网 发布:c语言实型数据 编辑:程序博客网 时间:2024/04/26 07:39
- (void)showAutoDialogWithTitle:(NSString *)title message:(NSString *)message
{
UIAlertView *alert = [[UIAlertViewalloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:nil];
[alert show];
[NSTimer scheduledTimerWithTimeInterval:1.0f
target:self
selector:@selector(dismissAlert:)
userInfo:[NSDictionarydictionaryWithObjectsAndKeys:alert, @"autoalert" ,nil] //如果不用传递参数,那么可以将此项设置为nil.
repeats:NO];
NSLog(@"release alert");
[alert release];
}
-(void) dismissAlert:(NSTimer *)timer{
NSLog(@"release timer");
UIAlertView *alert = [[timeruserInfo] objectForKey:@"autoalert"];
[alert dismissWithClickedButtonIndex:0animated:YES];
[_timerinvalidate];
_timer = nil;
}
- 自动消失对话框
- android中的对话框(AlertDialog)自动消失
- Android对话框显示后自动消失
- 自动显示对话框,并且隔一段时间自动消失
- 安卓开发 弹出对话框,然后自动消失
- Android下关于AlertDialog点击 确定或者取消按钮 对话框自动消失的 解决办法
- 点击对话框以外的地方,对话框消失
- AlertDialog指定按钮消失对话框
- android 对话框不消失 反射
- 关于对话框点击外面消失
- Android Alertdialog对话框点击消失?
- 顶部自动消失图片
- 顶部自动消失图片
- 存储过程自动消失
- UIAlertView自动消失
- UIAlertView自动消失
- UIAlertView自动消失
- 让UIAlertView自动消失
- 我允许失败,但是我不允许不努力!
- 软件定义无线电 (SDR) 和业余试验
- 威盛/网易笔试准备
- linux中的字符设备与块设备
- 企业 一
- 自动消失对话框
- C++的继承方式
- 通过Jar手动把war打包后,tomcat无法访问war包
- linux下解决:cannot execute binary file
- surface pro下android虚拟机无法启动的解决方案
- 仿百度文库方案[openoffice.org 3+swftools+flexpaper](一) 之 tomcat6.0+jdk1.6环境配置
- Lucene.Net 2.3.1开发介绍 —— 二、分词(一)
- 单例模式
- 深入浅出的理解框架(Struts2、Hibernate、Spring)与 MVC 设计模式