使用方法:
在自定义cell中加入以下方法即可
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
CGContextFillRect(context, rect);
// 分割线,
CGContextSetStrokeColorWithColor(context, [UIColor lightGrayColor].CGColor);
CGContextStrokeRect(context, CGRectMake(0, rect.size.height - 0.1, rect.size.width, 0.1));
}
网友评论