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)];
        
       
    }
    
    
    //记得设置代理 
  • 相关阅读:
    POJ 1182 食物链
    HDU 1385 Minimum Transport Cost
    HDU_2544 最短路
    HDU 2066 一个人的旅行
    poj3090
    poj3157
    poj3169
    poj3125
    poj3187
    VMware Workstation 8的简明使用教程
  • 原文地址:https://www.cnblogs.com/qingjoin/p/3031179.html
Copyright © 2011-2022 走看看