Skip to content

Commit

Permalink
Fix progress Ring view size issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzgerald committed Feb 1, 2017
1 parent 424820a commit a96a331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/ProgressRingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ public class ProgressRingView: UIView {
let bigRadius = (bounds.width / 2.0) - lineWidth
let centerRadius = bigRadius - lineWidth
let valueRatio = ProgressRingView.valueRatio(minumum: minimumValue, maximum: maximumValue, value: value)
let theLayer = circleLayer(color: outterColor, radius: bigRadius, angle:(M_PI * 2 * valueRatio) - M_PI_2 , lineWith: lineWidth)
let theLayer = circleLayer(color: outterColor, radius: bigRadius, angle: M_PI * 2 * valueRatio, lineWith: lineWidth)
layer.addSublayer(theLayer)

let theLayer2 = circleLayer(color: innerColor, radius: centerRadius, angle: (M_PI * 2) - M_PI_2, lineWith: lineWidth)
let theLayer2 = circleLayer(color: innerColor, radius: centerRadius, angle: M_PI * 2, lineWith: lineWidth)
layer.addSublayer(theLayer2)


Expand Down Expand Up @@ -211,7 +211,7 @@ extension CAShapeLayer {
let circlePath = UIBezierPath(arcCenter: center,
radius: radius,
startAngle: CGFloat(-M_PI_2),
endAngle:CGFloat(maxAngle),
endAngle:CGFloat(maxAngle - M_PI_2),
clockwise: clockwise)
path = circlePath.cgPath
frame = drawingFrame
Expand Down

0 comments on commit a96a331

Please sign in to comment.