From 4da8eddd8dc7ba3964935ee4acfa8aac98928de9 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Thu, 25 Jun 2020 17:57:42 -0400 Subject: [PATCH] corner radius --- MVMCoreUI/Atomic/Atoms/Views/Toggle.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift b/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift index ed2a015b..597b50ae 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift @@ -50,7 +50,7 @@ public typealias ActionBlockConfirmation = () -> (Bool) private var knobView: View = { let view = View() view.backgroundColor = .white - view.layer.cornerRadius = Toggle.getKnobHeight() / 2.0 + view.layer.cornerRadius = 14 return view }() @@ -205,9 +205,6 @@ public typealias ActionBlockConfirmation = () -> (Bool) knobHeightConstraint?.constant = Self.getKnobHeight() knobWidthConstraint?.constant = Self.getKnobWidth() - layer.cornerRadius = Self.getContainerHeight() / 2.0 - knobView.layer.cornerRadius = Self.getKnobHeight() / 2.0 - changeStateNoAnimation(isOn) } @@ -225,7 +222,7 @@ public typealias ActionBlockConfirmation = () -> (Bool) widthConstraint = widthAnchor.constraint(equalToConstant: Self.containerSize.width) widthConstraint?.isActive = true - layer.cornerRadius = Self.containerSize.height / 2.0 + layer.cornerRadius = 15 backgroundColor = containerTintColor.off addSubview(knobView)