From 71caeb69741ae6a0635be5fbdede71a67bb5ccaf Mon Sep 17 00:00:00 2001 From: Luis Padron Date: Sat, 4 Feb 2017 13:54:05 -0500 Subject: [PATCH] Fix setting for line dash --- CHANGELOG.md | 4 ++++ UICircularProgressRing.podspec | 2 +- UICircularProgressRing/UICircularProgressRingLayer.swift | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa813aa..cab2b241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 1.2.1 + +- Fix line dash property when using `viewStyle = 3` not being set properly, thanks to [RomainBSQT](https://github.com/RomainBSQT). + # Version 1.2.0 diff --git a/UICircularProgressRing.podspec b/UICircularProgressRing.podspec index 444fa7b5..92f85b56 100644 --- a/UICircularProgressRing.podspec +++ b/UICircularProgressRing.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "UICircularProgressRing" - s.version = "1.2.0" + s.version = "1.2.1" s.summary = "A highly customizable circular progress bar for iOS written in Swift 3" s.description = <<-DESC diff --git a/UICircularProgressRing/UICircularProgressRingLayer.swift b/UICircularProgressRing/UICircularProgressRingLayer.swift index 2b4a3e7b..d48f1a8b 100644 --- a/UICircularProgressRing/UICircularProgressRingLayer.swift +++ b/UICircularProgressRing/UICircularProgressRingLayer.swift @@ -170,7 +170,7 @@ class UICircularProgressRingLayer: CAShapeLayer { // If the style is 3 or 4, make sure to draw either dashes or dotted path if viewStyle == 3 { - outerPath.setLineDash(patternForDashes, count: 1, phase: 0.0) + outerPath.setLineDash(patternForDashes, count: patternForDashes.count, phase: 0.0) } else if viewStyle == 4 { outerPath.setLineDash([0, outerPath.lineWidth * 2], count: 2, phase: 0) outerPath.lineCapStyle = .round