Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Fix setting for line dash
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Padron authored and Luis Padron committed Feb 4, 2017
1 parent d286bdd commit 71caeb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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


Expand Down
2 changes: 1 addition & 1 deletion UICircularProgressRing.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion UICircularProgressRing/UICircularProgressRingLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71caeb6

Please sign in to comment.