From 745e24319bfa99ec1184075a2c6e7ed4b559c1c8 Mon Sep 17 00:00:00 2001 From: lldong Date: Tue, 11 Sep 2012 13:21:24 +0800 Subject: [PATCH] Stroke OMColorFrameView's border with dash line. --- Classes/OMColorFrameView.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/OMColorFrameView.m b/Classes/OMColorFrameView.m index db14d0c..c833325 100644 --- a/Classes/OMColorFrameView.m +++ b/Classes/OMColorFrameView.m @@ -15,7 +15,10 @@ @implementation OMColorFrameView - (void)drawRect:(NSRect)dirtyRect { [self.color setStroke]; - [NSBezierPath strokeRect:NSInsetRect(self.bounds, 0.5, 0.5)]; + CGFloat dash[2] = { 2, 2 }; + NSBezierPath *path = [NSBezierPath bezierPathWithRect:NSInsetRect(self.bounds, 0.5, 0.5)]; + [path setLineDash:dash count:2 phase:0]; + [path stroke]; } - (void)setColor:(NSColor *)color