+ Dynamic widths of the outlines, depending on the size of annotations.

This commit is contained in:
Moritz Haarmann
2014-04-28 01:06:19 +02:00
parent 35a7e50bb2
commit fb271e8acb
2 changed files with 18 additions and 2 deletions

View File

@@ -48,6 +48,15 @@
self.strokeLayer.frame = self.bounds;
self.strokeLayer.path = [UIBezierPath bezierPathWithRoundedRect:self.bounds cornerRadius:10].CGPath;
CGFloat lineWidth = MAX(self.frame.size.width / 10.0f,10);
[CATransaction begin];
[CATransaction setAnimationDuration:0];
self.strokeLayer.lineWidth = lineWidth/1.5f;
self.shapeLayer.lineWidth = lineWidth / 3.0f;
[CATransaction commit];
}
-(BOOL)resizable {