UIAlertView的状态监视

        设置了UIAlertView的Delegate属性后,当按钮被触控时,将调用次delegate的alerView:clickedButtonAtIndex:方法。uialertViewDelegate协议中还定义了现实和关闭警告框通知状态变化。


方法名

-(void)willpresentAlertView:(UIalertView*)alertView

调用时机

警告框显示前被调用






方法名

-(void)didpresentAlertView:(UialertView*)alertView

调用时机

警告框显示后被调用




方法名

-(void)alertViewCancel:(UIAlertView *)alertView

调用时机

警告显示中强制关闭是被调用。例如:警告框显示时程序突然关闭等场合。注意:触摸按钮时不调用该方法。


方法名

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

调用时机

触摸警告框中的任意按钮时被调用。此方法比-(void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex方法先辈调用。



方法名

-(void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex

调用时机

警告框关闭前调用



方法名

-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex

调用方法

警告框关闭前被调用。警告框显示中应用程序进入睡眠状态时被调用。










  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值