CGRect drawRect = {10,10,SCREEN_WIDTH - 10*2,40};
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 1);
CGContextSetStrokeColorWithColor(context, DEFAULT_LINE_COLOR.CGColor);
CGFloat lengths[] = {3,3};
CGContextSetLineDash(context, 0, lengths,2);
UIBezierPath *bezierPath = [UIBezierPath bezierPathWithRoundedRect:drawRect cornerRadius:7];
CGContextAddPath(context, bezierPath.CGPath);
CGContextStrokePath(context);
CGContextClosePath(context);
网友评论