title: How to initialize UIBezierPath to draw a circle in swift?
body: <p>I'm trying to draw a circle in Swift, but when I write my code I get a error "could not find an overload for 'init' that accepts the supplied arguments.</p>
  
  <p>In the class UIBezierPath there is a init function:</p>
  
  <pre><code> init(arcCenter center: CGPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool) -&gt; UIBezierPath
  </code></pre>
  
  <p>But when I declared this with this code I get the error.. Need I cast any variable to other type? but if I compiled this in iphone 4 I don't get the error, only in iphone 5/5s.  How can declare this correctly?</p>
  
  <pre><code>  let arcCenter   = CGPoint(x: CGRectGetMidX(self.bounds), y: CGRectGetMidY(self.bounds))
      let radius      = Float(min(CGRectGetMidX(self.bounds) - 1, CGRectGetMidY(self.bounds)-1))
  
      let circlePath : UIBezierPath = UIBezierPath(arcCenter: arcCenter, radius: radius, startAngle: -rad(90), endAngle: rad(360-90), clockwise: true)
  </code></pre>
  
  <p>Thanks!</p>