title: UIBezierPath bezierPathWithArcCenter not properly centered
body: <p>I have a view in which I want to draw a circle with <code>UIBezierPath bezierPathWithArcCenter</code>. My view's <code>initWithFrame</code> is as follows:</p>
  
  <pre><code>- (instancetype)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if(self == nil) {
          return nil;
      }
  
      self.circleLayer = [CAShapeLayer layer];
      self.circleLayer.fillColor = UIColor.clearColor.CGColor;
      self.circleLayer.strokeColor = UIColor.blackColor.CGColor;
      self.circleLayer.lineWidth = 4;
      self.circleLayer.bounds = self.bounds;
  
  
      self.startAngle = 0.0;
      self.endAngle = M_PI *  2;
      CGPoint center = CGPointMake(self.frame.size.width * 0.5, self.frame.size.height * 0.5);
      CGFloat radius = self.frame.size.height * 0.45;
      self.circleLayer.path = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:self.startAngle endAngle:self.endAngle clockwise:YES].CGPath;
  
      [self.layer addSublayer:self.circleLayer];
  
      self.backgroundColor = UIColor.greenColor;
  
      return self;
  }
  </code></pre>
  
  <p>I expected that would produce a black circle centered in my view. However, the actual output looks like this:<br>
  <a href="https://i.stack.imgur.com/eBO9u.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eBO9u.png" alt="Actual output"></a></p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT</strong>
  The weirdest part is that it's drawn correctly after a fresh install of the app - any consecutive launches result in it being drawn like in the image attached. Why?</p>