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)];
        
       
    }
    
    
    //记得设置代理 
  • 相关阅读:
    ZOJ 1002 Fire Net
    Uva 12889 One-Two-Three
    URAL 1881 Long problem statement
    URAL 1880 Psych Up's Eigenvalues
    URAL 1877 Bicycle Codes
    URAL 1876 Centipede's Morning
    URAL 1873. GOV Chronicles
    Uva 839 Not so Mobile
    Uva 679 Dropping Balls
    An ac a day,keep wa away
  • 原文地址:https://www.cnblogs.com/qingjoin/p/3031179.html
Copyright © 2011-2022 走看看