From 9f5600a0f30cd47834351afdc371ae2b5e516205 Mon Sep 17 00:00:00 2001 From: Priya Date: Mon, 20 May 2019 15:51:07 -0400 Subject: [PATCH] switch modification --- MVMCoreUI/Molecules/Switch.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Molecules/Switch.swift b/MVMCoreUI/Molecules/Switch.swift index 1c58d5e5..4f410366 100644 --- a/MVMCoreUI/Molecules/Switch.swift +++ b/MVMCoreUI/Molecules/Switch.swift @@ -84,7 +84,8 @@ import UIKit } func setupConstraints() { - NSLayoutConstraint.constraintPinLeftSubview(label, leftConstant: 0) + NSLayoutConstraint.constraintPinLeftSubview(label, leftConstant: 0) + NSLayoutConstraint.constraintPinSubview(mvmSwitch, pinCenterX: false, pinCenterY: true) let dict = NSLayoutConstraint.constraintPinSubview(mvmSwitch, pinTop: true, topConstant: 0, topRelation: .greaterThanOrEqual, pinBottom: true, bottomConstant: 0, bottomRelation: .greaterThanOrEqual, pinLeft: false, leftConstant: 0, leftRelation: .equal, pinRight: true, rightConstant: 0, rightRelation: .greaterThanOrEqual) topConstraint_Switch = dict?[ConstraintTop] as? NSLayoutConstraint NSLayoutConstraint.constraintPinTopSubview(label, topConstant: 0)