title: CAShapeLayer used in UIView subclass doesn't work
body: <p>i tried a few hours to get a dotted border around my UIView with CAShapeLayer but i don't get it displayed.<br>
  <strong>ScaleOverlay.h</strong>  </p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;QuartzCore/QuartzCore.h&gt;
  
  @interface ScaleOverlay : UIView &lt;UIGestureRecognizerDelegate&gt; {
      CAShapeLayer *shapeLayer_;
  }
  @end
  </code></pre>
  
  <p><strong>ScaleOverlay.m</strong></p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame
  {
  self = [super initWithFrame:frame];
  if (self) {
      self.backgroundColor = [UIColor redColor];
      self.alpha = 0;
      //Round corners
      [[self layer] setCornerRadius:8.f];
      [[self layer] setMasksToBounds:YES];
      //Border
      shapeLayer_ = [[CAShapeLayer layer] retain];
  
      CGMutablePathRef path = CGPathCreateMutable();
      CGPathAddRect(path, NULL, frame);
      shapeLayer_.path = path;
      CGPathRelease(path);
      shapeLayer_.backgroundColor = [[UIColor clearColor] CGColor];
      shapeLayer_.frame = frame;
      shapeLayer_.position = self.center;
  
      [shapeLayer_ setValue:[NSNumber numberWithBool:NO] forKey:@"isCircle"];
      shapeLayer_.fillColor = [[UIColor blueColor] CGColor];
      shapeLayer_.strokeColor = [[UIColor blackColor] CGColor];
      shapeLayer_.lineWidth = 4.;
      shapeLayer_.lineDashPattern = [NSArray arrayWithObjects:[NSNumber numberWithInt:8], [NSNumber numberWithInt:8], nil];
      shapeLayer_.lineCap = kCALineCapRound;
  }
  return self;
  }
  </code></pre>
  
  <p>I got a red rect drawn in my Superview but not the border. Copied this from a source example in the hope it would work, but it doesn't.  </p>