cell自定义划线
- (void)drawRect:(CGRect)rect {
// CGContextRef context = UIGraphicsGetCurrentContext();
// CGContextSetFillColorWithColor(context,[UIColor clearColor].CGColor);
// CGContextFillRect(context, rect);
// //上分割线,
//// CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor); CGContextStrokeRect(context, CGRectMake(5, -1, rect.size.width - 10, 1));
// //下分割线
// CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor); CGContextStrokeRect(context, CGRectMake(5, rect.size.height, rect.size.width - 10, 1));
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [UIColorwhiteColor].CGColor);
CGContextSetFillColorWithColor(context, [UIColorwhiteColor].CGColor);
CGRect drawRect = CGRectMake(10, 0, CGRectGetWidth(rect)-20, CGRectGetHeight(rect));
CGContextStrokeRect(context, drawRect);
CGContextFillRect(context, drawRect);
//
CGContextSetStrokeColorWithColor(context,[UIColorffcolorWithHexString:@"#e8e8e8"].CGColor); CGContextStrokeRect(context, CGRectMake(20, rect.size.height, rect.size.width-40 ,1));
CGContextDrawPath(context, kCGPathFillStroke);
}
//关键
cell.backgroundColor = [UIColorclearColor];
detailTable.backgroundColor = rgba(237, 240, 243, 1);
detailTable.separatorStyle=UITableViewCellSeparatorStyleNone;