1、重写drawRect(rect:CGRect)这个方法
2、将tableview的下划线设置成none
3、修改下划线属性,代码如下
override func drawRect(rect: CGRect) {
let context = UIGraphicsGetCurrentContext()
CGContextSetFillColorWithColor(context, UIColor.clearColor().CGColor)
CGContextFillRect(context, rect)
println(rect.size.width)
CGContextSetStrokeColorWithColor(context, UIColor.blueColor().CGColor)
CGContextStrokeRect(context, CGRectMake(20, rect.size.height, rect.size.width-40, 1))
}