From ae78bd6f643f2c6c7cccaee2416888410ec0fee7 Mon Sep 17 00:00:00 2001 From: Tosin Afolabi Date: Thu, 14 Mar 2019 13:56:15 -0700 Subject: [PATCH] Minor nits. --- PanModal/Controller/PanModalPresentationController.swift | 4 ++-- PanModal/Presentable/PanModalPresentable+Defaults.swift | 2 +- PanModal/Presentable/PanModalPresentable.swift | 2 +- Tests/PanModalTests.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 1150ccc..3739c19 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -809,12 +809,12 @@ private extension PanModalPresentationController { drawAroundDragIndicator(currentPath: path, indicatorLeftEdgeXPos: indicatorLeftEdgeXPos) } - // 6. Set path as a mask to display optional drag indicator view & rounded corners + // Set path as a mask to display optional drag indicator view & rounded corners let mask = CAShapeLayer() mask.path = path.cgPath view.layer.mask = mask - // 7. Improve performance by rasterizing the layer + // Improve performance by rasterizing the layer view.layer.shouldRasterize = true view.layer.rasterizationScale = UIScreen.main.scale } diff --git a/PanModal/Presentable/PanModalPresentable+Defaults.swift b/PanModal/Presentable/PanModalPresentable+Defaults.swift index e127e76..eefd60f 100644 --- a/PanModal/Presentable/PanModalPresentable+Defaults.swift +++ b/PanModal/Presentable/PanModalPresentable+Defaults.swift @@ -78,7 +78,7 @@ public extension PanModalPresentable where Self: UIViewController { } var cornerRadius: CGFloat { - return 8 + return 8.0 } var showDragIndicator: Bool { diff --git a/PanModal/Presentable/PanModalPresentable.swift b/PanModal/Presentable/PanModalPresentable.swift index 8848bc6..4b01afe 100644 --- a/PanModal/Presentable/PanModalPresentable.swift +++ b/PanModal/Presentable/PanModalPresentable.swift @@ -140,7 +140,7 @@ public protocol PanModalPresentable { /** The corner radius used when `shouldRoundTopCorners` is enabled. - Default Value is `8.0` + Default Value is 8.0 */ var cornerRadius: CGFloat { get } diff --git a/Tests/PanModalTests.swift b/Tests/PanModalTests.swift index 089eb3e..be6d387 100644 --- a/Tests/PanModalTests.swift +++ b/Tests/PanModalTests.swift @@ -59,7 +59,7 @@ class PanModalTests: XCTestCase { XCTAssertEqual(vc.shouldRoundTopCorners, false) XCTAssertEqual(vc.showDragIndicator, false) XCTAssertEqual(vc.shouldRoundTopCorners, false) - XCTAssertEqual(vc.cornerRadius, 8) + XCTAssertEqual(vc.cornerRadius, 8.0) } func testPresentableYValues() {