首页 > 移动平台 > 详细

iOS tableView 自定义sepatator

时间:2017-04-26 10:57:04      阅读:149      评论:0      收藏:0      [点我收藏+]

  可以设置分割线的高度并填充颜色。

- (void)drawRect:(CGRect)rect
{
    CGContextRef context = UIGraphicsGetCurrentContext();

    CGContextSetLineWidth(context, 2.0);
    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
    CGContextFillRect(context, rect);
    
    CGContextSetStrokeColorWithColor(context, ViewBgColor.CGColor);
    CGContextStrokeRect(context, CGRectMake(0, rect.size.height - 2, rect.size.width, 2));
}

 

iOS tableView 自定义sepatator

原文:http://www.cnblogs.com/guchunli/p/6767427.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!