重寫Cell中的drawRect
- (void)drawRect:(CGRect)rect {
CGContextRefcontext =UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColorclearColor].CGColor);
CGContextFillRect(context, rect);
//繪制分割線,其實就是在cell內(nèi)畫一條線
CGContextSetStrokeColorWithColor(context, [UIColorgrayColor].CGColor);
//設(shè)置所畫線的frame
CGContextStrokeRect(context,CGRectMake(5, rect.size.height, rect.size.width-10,1));
}