UIImageView*_lineView=[[UIImageView alloc]initWithFrame:CGRectMake(pixw(15), _nameLabel.y+_nameLabel.height+pixw(15), self.width-pixw(15)*2, 0.5)];
// _lineView.backgroundColor=[XHColor colorWithHexString:@"cccccc"];
UIGraphicsBeginImageContext(_lineView.frame.size); //开始画线
[_lineView.image drawInRect:CGRectMake(0, 0, _lineView.frame.size.width, _lineView.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); //设置线条终点形状
CGFloat lengths[] = {1,1};
CGContextRef line = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(line, RGB(204, 204, 204).CGColor);
CGContextSetLineDash(line, 0, lengths, 2); //画虚线
CGContextMoveToPoint(line, 0, 0.5); //开始画线
CGContextAddLineToPoint(line, _lineView.width,0.5);
CGContextStrokePath(line);
_lineView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self addSubview:_lineView];