zoukankan      html  css  js  c++  java
  • UIAlertview改变按钮位置 大小

    //versionAlertView最好设为全局
    versionAlertView = [[UIAlertView alloc] initWithTitle:@"标题" message:@"One Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style\nOne Style" delegate:self cancelButtonTitle:@"cancle" otherButtonTitles:@"One", @"two", nil];
        [versionAlertView show];
        [versionAlertView release];
    
    
    //这里可以改变
    - (void)willPresentAlertView:(UIAlertView *)alertView
    {
       
        UIButton * cancelButton = (UIButton *)[alertView viewWithTag:1];
        [cancelButton setFrame:CGRectMake(19, versionAlertView.bounds.size.height - 60, 70, 40)];
        //CGRectMake(cancelButton.frame.origin.x, 100, cancelButton.frame.size.width, cancelButton.frame.size.height);
        UIButton * oneButton = (UIButton *)[alertView viewWithTag:2];
        [oneButton setFrame:CGRectMake(18+19+70, versionAlertView.bounds.size.height - 60, 70, 40)];
        
        UIButton * twoButton = (UIButton *)[alertView viewWithTag:3];
        [twoButton setFrame:CGRectMake(70+70+18+18+20, versionAlertView.bounds.size.height - 60, 70, 40)];
        
       
    }
    
    
    //记得设置代理 
  • 相关阅读:
    ubuntu下开发环境的搭建
    用移动存储设备安装Ubuntu全攻略
    LAMP服务器搭建
    PHP关闭提示、打印配置
    PHPmyadmin修改root密码
    转 sql2oracle
    SQL Server链接其他数据库服务器的方法(转)
    转(哈希查找)
    日语网址
    Reflector 右键注册
  • 原文地址:https://www.cnblogs.com/qingjoin/p/3031179.html
Copyright © 2011-2022 走看看