UIButton 的不一樣設置和UITextField 的默認值(修改默認值)

    UIButton *btn31 = [[UIButton alloc]initWithFrame:CGRectMake(200, 0, 65, 40)];spa

    

    [btn31 setTitle:@"獲取驗證碼" forState:UIControlStateNormal];3d

    [btn31.titleLabel setFont:[UIFont systemFontOfSize:12.0]];orm

    [btn31 setTitleColor:[UIColor colorWithRed:19/255.0f green:181/255.0f blue:224/255.0f alpha:1] forState:UIControlStateNormal];it

    

    [field addSubview:btn31];驗證碼


    UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];登錄

    

    [btn2 setFrame:CGRectMake(10, 100, 300, 40)];im

    [btn2 setTitle:@"登陸" forState:UIControlStateNormal];d3

    [btn2.titleLabel setFont:[UIFont systemFontOfSize:17.0]];margin

    [btn2.titleLabel setTextAlignment:NSTextAlignmentCenter];top

    [btn2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];

    [btn2 setBackgroundImage:[UIImage imageNamed:@"bt_bigbutton_nor@2x.png"] forState:UIControlStateNormal];

    [btn2 setBackgroundImage:[UIImage imageNamed:@"bt_bigbutton_press@2x.png"] forState:UIControlStateHighlighted];




    [field3 setPlaceholder:@"驗證碼"];

    [field3 setValue:[UIColor colorWithRed:176/255.0f green:176/255.0f blue:176/255.0f alpha:1] forKeyPath:@"_placeholderLabel.textColor"];

相關文章
相關標籤/搜索