From d9e6faadb7692d45d2f8b6a16b6aaaf288ff188c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81ukasi=C5=84ski?= Date: Sat, 13 Feb 2021 01:30:21 +0100 Subject: [PATCH] fixed issue with changing timer direction --- SRCountdownTimer/SRCountdownTimer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SRCountdownTimer/SRCountdownTimer.swift b/SRCountdownTimer/SRCountdownTimer.swift index 68fff0e..e2aa8b6 100644 --- a/SRCountdownTimer/SRCountdownTimer.swift +++ b/SRCountdownTimer/SRCountdownTimer.swift @@ -127,7 +127,7 @@ public class SRCountdownTimer: UIView { radius: radius, startAngle: currentAngle - .pi / 2, endAngle: .pi * 2 - .pi / 2, - clockwise: false) + clockwise: !moveClockWise) context?.setStrokeColor(lineColor.cgColor) context?.strokePath() @@ -138,7 +138,7 @@ public class SRCountdownTimer: UIView { radius: radius, startAngle: -.pi / 2, endAngle: currentAngle - .pi / 2, - clockwise: false) + clockwise: !moveClockWise) context?.setStrokeColor(trailLineColor.cgColor) context?.strokePath() }