码迷,mamicode.com
首页 > 其他好文 > 详细

UI的一些方法(按钮和线)

时间:2015-07-24 20:31:22      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:

//设置按钮字体颜色

    [self.determineBtn setTitleColor:[UIColor colorWithHexString:@"0xff9500"] forState:UIControlStateNormal];

    [self.clearBtn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];

    

    //设置button的边框的颜色和粗细

    self.determineBtn.layer.borderWidth = 0.5;

    self.determineBtn.layer.borderColor = [UIColor colorWithHexString:@"0xff9500"].CGColor;

    self.clearBtn.layer.borderWidth = 0.5;

    self.clearBtn.layer.borderColor = [UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1].CGColor;

    //设置圆角

    self.clearBtn.layer.masksToBounds = YES;

    self.clearBtn.layer.cornerRadius = 5;

    

    self.determineBtn.layer.masksToBounds = YES;

    self.determineBtn.layer.cornerRadius = 5;

    //设置线的高度的约束值

    self.oneConstraint.constant = 0.45;

    self.twoConstraint.constant = 0.45;

    self.threeConstraint.constant = 0.45;

    self.fourConstraint.constant = 0.45;

    self.fiveConstraint.constant = 0.45;

UI的一些方法(按钮和线)

标签:

原文地址:http://www.cnblogs.com/shilang2015/p/4674214.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!