- (UIImage *)dashLineImage:(CGSize)size
{
CGFloat lengths[] = {3, 2};
UIGraphicsBeginImageContext(size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextBeginPath(context);
CGContextSetLineWidth(context, size.height);
CGContextSetStrokeColorWithColor(context, [UIColor grayColor].CGColor);
CGContextSetLineDash(context, 0, lengths, 2);
CGContextMoveToPoint(context, 0, 0);
CGContextAddLineToPoint(context, size.width, 0);
CGContextStrokePath(context);
CGContextClosePath(context);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}