自己绘制边框

    UIColor *taskColor = [UIColor colorWithRed:0.98f green:0.92f blue:0.80f alpha:1.0f];
    UIButton *taskBtn = [[UIButton alloc] initWithFrame:CGRectMake(40, 150, 280, 160)];
    taskBtn.backgroundColor = taskColor;
     
    CALayer *bottomBorder = [CALayer layer];
    floatheight=taskBtn.frame.size.height-1.0f;
    floatwidth=taskBtn.frame.size.width;
    bottomBorder.frame = CGRectMake(0.0f, height, width, 1.0f);
    bottomBorder.backgroundColor = [UIColor redColor].CGColor;
    [taskBtn.layer addSublayer:bottomBorder];

Tableview边框
http://bbs.csdn.net/topics/330190149
style="border:1px solid #ccc;border-top:none;border-bottom:none;"

例子 1
border-width:thin medium thick 10px;上边框是细边框
右边框是中等边框
下边框是粗边框
左边框是 10px 宽的边框
例子 2
border-width:thin medium thick;上边框是 10px
右边框和左边框是中等边框
下边框是粗边框
例子 3
border-width:thin medium;上边框和下边框是细边框
右边框和左边框是中等边框
例子 4
border-width:thin;所有 4 个边框都是细边框


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值