#import <QuartzCore/QuartzCore.h>
- (void)viewDidLoad {
CALayer *TopBorder = [CALayer layer];
TopBorder.frame = CGRectMake(0.0f, 0.0f, myview.frame.size.width, 3.0f); TopBorder.backgroundColor = [UIColor redColor].CGColor;
[myview.layer addSublayer:TopBorder];
[super viewDidLoad];
}
//顶部line
CALayer *topAdnBottom = [CALayer layer];
topAdnBottom.frame = CGRectMake(0.0f, 0.0f, SCREEN_WIDTH, 1.0f);
topAdnBottom.backgroundColor = LINE_CORLOR.CGColor;
[startPlayView.layer addSublayer:topAdnBottom];
//尾部line
CALayer *bottomBorder = [CALayer layer];
bottomBorder.frame = CGRectMake(0.0f, startPlayView.frame.size.height - 1, SCREEN_WIDTH, 1.0f);
bottomBorder.backgroundColor = LINE_CORLOR.CGColor;
CALayer *topAdnBottom = [CALayer layer];
topAdnBottom.frame = CGRectMake(0.0f, 0.0f, SCREEN_WIDTH, 1.0f);
topAdnBottom.backgroundColor = LINE_CORLOR.CGColor;
[startPlayView.layer addSublayer:topAdnBottom];
//尾部line
CALayer *bottomBorder = [CALayer layer];
bottomBorder.frame = CGRectMake(0.0f, startPlayView.frame.size.height - 1, SCREEN_WIDTH, 1.0f);
bottomBorder.backgroundColor = LINE_CORLOR.CGColor;
[startPlayView.layer addSublayer:bottomBorder];