自定义cell 分割线

- (void)drawRect:(CGRect)rect

{

    CGContextRef context = UIGraphicsGetCurrentContext();

    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);

    CGContextFillRect(context, rect);

    //上分割线,

    CGContextSetStrokeColorWithColor(context, SEPARATOR_LINE_COLOR.CGColor);

    CGContextStrokeRect(context, CGRectMake(5, -1, rect.size.width - 10, 1));

    //下分割线

    CGContextSetStrokeColorWithColor(context, SEPARATOR_LINE_COLOR.CGColor);

    CGContextStrokeRect(context, CGRectMake(5, rect.size.height, rect.size.width - 10, 1));

}

posted on 2016-03-07 17:03  不穿内裤的熊猫  阅读(216)  评论(0编辑  收藏  举报