zoukankan      html  css  js  c++  java
  • UIAlertView遇到的问题

    在做项目的时候遇到了一个问题,有关新浪微博的,就是调用新浪微博的一段代码 放在button点击事件里是能看到效果的,但是放到UIAlertView的点击事件里,通过断点测试是能执行到的,但是没有出现效果,用的是这个方法:- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;

     

    突然间感觉调用新浪微博的网页登陆页面有一个webView的弹出界面,可能跟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;//编辑任何默认的字段添加的风格之后调用

  • 相关阅读:
    MVC的一个分页,网上摘录,自己少量修改
    Hibernate调用带返回值的存储过程的方法
    让tomcat启动后自动进行一些操作
    Java中汉字转拼音
    [转]asp.net response.ContentType 下载文件的四种方法
    [转]c3p0详细配置
    js替换换行
    JS省市区联动,可由数据库提取数据至JS
    silverlight导入文件到WebService
    Java生成Guid
  • 原文地址:https://www.cnblogs.com/neworiginou/p/2957307.html
Copyright © 2011-2022 走看看