UIAlertView的代理方法
2013-10-12 16:59
239 查看
在iPad 应用中, 判断用户是否登录 , 如果未登录 , 弹出警示框 , 带有登录按钮的, 在
- (void)alertView:(UIAlertView *)alertView
clickedButtonAtIndex:(NSInteger)buttonIndex;
这个方法中调用登录方法 , 弹出的登录窗口瞬时消失 。 这是什么问题呢 ?
或许这个登录的弹出界面,跟UIAlertView的动画冲突了。
UIAlertView的代理方法查了一下
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;这个方法是当View的隐藏动画结束的时候进行回调;于是用了这个,呵呵,居然能看到效果了,嗯,多想想,多联想
还是有好处的!!!
还有几个回调:
- (void)alertViewCancel:(UIAlertView *)alertView;
//当用户按下HOME键的时候,回调此方法,用户点击Cancel按钮的时候不会回调此方法
- (void)willPresentAlertView:(UIAlertView *)alertView//开始显示View的动画之前进行回调
- (void)didPresentAlertView:(UIAlertView *)alertView//显示动画完成之后进行回调
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex//将要开始View隐藏动画的时候进行回调
- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView;//编辑任何默认的字段添加的风格之后调用
- (void)alertView:(UIAlertView *)alertView
clickedButtonAtIndex:(NSInteger)buttonIndex;
这个方法中调用登录方法 , 弹出的登录窗口瞬时消失 。 这是什么问题呢 ?
或许这个登录的弹出界面,跟UIAlertView的动画冲突了。
UIAlertView的代理方法查了一下
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;这个方法是当View的隐藏动画结束的时候进行回调;于是用了这个,呵呵,居然能看到效果了,嗯,多想想,多联想
还是有好处的!!!
还有几个回调:
- (void)alertViewCancel:(UIAlertView *)alertView;
//当用户按下HOME键的时候,回调此方法,用户点击Cancel按钮的时候不会回调此方法
- (void)willPresentAlertView:(UIAlertView *)alertView//开始显示View的动画之前进行回调
- (void)didPresentAlertView:(UIAlertView *)alertView//显示动画完成之后进行回调
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex//将要开始View隐藏动画的时候进行回调
- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView;//编辑任何默认的字段添加的风格之后调用
相关文章推荐
- iOS开发之用block来实现UIAlertView点击事件的代理方法
- 4.ScrollView常用属性,常用代理方法,图片轮播器,UIAlertView/UIActionSheet
- [iPhone开发之控件的使用]UIAlertView的各种属性、方法及代理的使用
- [iPhone开发之控件的使用]UIAlertView的各种属性、方法及代理的使用
- UIAlertView的各种属性、方法及代理的使用
- 模仿系统方法自定义UIAlertView的实现和代理
- 二十三 ,iOS UIAlertView使用block来实现代理方法;
- UIAlertView的各种属性、方法及代理的使用
- 补充UIAlertView的一些知识,包括UIAlertViewStyleLoginAndPasswordInput和代理方法
- UIAlertView的各种属性、方法及代理的使用
- UIAlertView基本用法详解和delegate方法调用
- UITableView代理方法的执行流程
- UIALertView的基本用法与UIAlertViewDelegate对对话框的事件处理方法
- UICollectionView的简单使用和常用代理方法
- iOS中的UIAlertView之新方法(弹出警告框)
- UIScrollView的代理方法
- UITableView的常用代理方法
- iOS 设计中关于UIScrollViewDelegate的几个代理方法的简单介绍
- ios-UIAlertView,UIActionSheet-常用方法
- IOS--UIAlertViewDelegate对对话框的事件处理方法