美文网首页
2018-07-24

2018-07-24

作者: 王家小雷 | 来源:发表于2018-07-24 11:12 被阅读4次

    加边框
    //右边框
    CALayer *rightLayer = [CALayer layer];
    rightLayer.backgroundColor = [UIColor lightGrayColor].CGColor;
    rightLayer.frame = CGRectMake(view1.frame.size.width-1.0, 0, 1.0, view1.frame.size.height);
    [view1.layer addSublayer:rightLayer];
    //下边框
    CALayer *bottomLayer = [CALayer layer];
    bottomLayer.backgroundColor = [UIColor lightGrayColor].CGColor;
    bottomLayer.frame = CGRectMake(0,view1.frame.size.height-1.0, view1.frame.size.width, 1.0);
    [view1.layer addSublayer:bottomLayer];

    相关文章

      网友评论

          本文标题:2018-07-24

          本文链接:https://www.haomeiwen.com/subject/ipsemftx.html