2018-07-24

加边框
//右边框
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)