UITableViewCell分割線的自定義
一:將系統(tǒng)隱藏,自己自定義一條;
二:在cell中重寫
// 重寫底部分割線
-
(void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
CGContextFillRect(context, rect);CGContextSetStrokeColorWithColor(context, [UIColor colorWithRed:0xE2/255.0f green:0xE2/255.0f blue:0xE2/255.0f alpha:0.9].CGColor);
CGContextStrokeRect(context, CGRectMake(10, rect.size.height - 0.5, rect.size.width-10, 0.5));
}