From 7288a935dafa99cfc5f3e38ed1b91323594eaa19 Mon Sep 17 00:00:00 2001 From: Ameir Al-Zoubi Date: Mon, 27 Mar 2017 19:48:33 -0400 Subject: [PATCH] Silencing warnings by changing M_PI to .pi --- .../SkyFloatingLabelTextFieldWithIconTests.swift | 2 +- Sources/SkyFloatingLabelTextFieldWithIcon.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift b/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift index 9b35d28..e4c84be 100644 --- a/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift +++ b/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift @@ -80,7 +80,7 @@ class SkyFloatingLabelTextFieldWithIconTests: XCTestCase { floatingLabelTextFieldWithIcon.iconRotationDegrees = 45 // then - let expectedTransform = CGAffineTransform(rotationAngle: CGFloat(45.0 * M_PI / 180.0)) + let expectedTransform = CGAffineTransform(rotationAngle: CGFloat(45.0 * .pi / 180.0)) XCTAssertEqual(floatingLabelTextFieldWithIcon.iconLabel.transform.a, expectedTransform.a) XCTAssertEqual(floatingLabelTextFieldWithIcon.iconLabel.transform.b, expectedTransform.b) XCTAssertEqual(floatingLabelTextFieldWithIcon.iconLabel.transform.c, expectedTransform.c) diff --git a/Sources/SkyFloatingLabelTextFieldWithIcon.swift b/Sources/SkyFloatingLabelTextFieldWithIcon.swift index ff7e62f..c652b77 100644 --- a/Sources/SkyFloatingLabelTextFieldWithIcon.swift +++ b/Sources/SkyFloatingLabelTextFieldWithIcon.swift @@ -74,7 +74,7 @@ open class SkyFloatingLabelTextFieldWithIcon: SkyFloatingLabelTextField { @IBInspectable open var iconRotationDegrees:Double = 0 { didSet { - self.iconLabel.transform = CGAffineTransform(rotationAngle: CGFloat(iconRotationDegrees * M_PI / 180.0)) + self.iconLabel.transform = CGAffineTransform(rotationAngle: CGFloat(iconRotationDegrees * .pi / 180.0)) } }