简体   繁体   English

AlertView应该自行消失

[英]AlertView Should Disappear On Its Own

如何不使用任何取消按钮就使Alertview自行消失?

use this... 用这个...

-(void)showAlertView
{
   // code for showing your alertView
   [self performSelector:@selector(dismissAlertView) withObject:yourObject afterDelay:5]
}

-(void)dismissAlertView
{
    [yourAlert dismissWithClickedButtonIndex:0 animated:YES];
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果在iphone中显示另一个警报视图,则不应显示警报视图 - Should not display the alertview if already another alertview is displaying in iphone 在日历事件的 alertView 中设置我自己的消息 - set my own message in the alertView of calendar events 属性列表是否应该由其自己的模型对象管理? - Should a property list be managed by its own model object? 移动网站应该有自己的子域吗? - Should a mobile website have its own sub domain? 在iPhone编程中,子视图应更改其自身的框架和中心,还是超级视图应更改其框架和中心? - In iPhone programming, should a subview change its own frame and center or should a superview change them? 为什么此alertView代码不起作用? 没有错误,只是没有做应该做的 - Why is this alertView code not working? No error, just not doing as it should 单独使用UINavigationViewController - Using a UINavigationViewController on its own UIScrollView自行移动 - UIScrollView moves on its own 如果我有一个包含100个对象的数据列表,并且每个对象都有自己的数据,我应该使用哪种类型的数据存储? - What type of data storage should I use if I have a list of data that contains 100 objects and each object has its own data? alertView没有响应 - alertView not responding
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM