From 0da0a44c4acbe4aa7c2c24c1b234c2d8446f5e6b Mon Sep 17 00:00:00 2001 From: Marco Cancellieri Date: Thu, 14 Mar 2019 21:35:20 +0100 Subject: [PATCH] pr comments --- PanModal/Controller/PanModalPresentationController.swift | 4 ++-- Tests/PanModalTests.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 5fe3241..37822c8 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -798,10 +798,10 @@ private extension PanModalPresentationController { func addRoundedCorners(to view: UIView) { let radius = presentable?.cornerRadius ?? 0 let path = UIBezierPath(roundedRect: view.bounds, - byRoundingCorners:[.topRight, .topLeft], + byRoundingCorners: [.topRight, .topLeft], cornerRadii: CGSize(width: radius, height: radius)) - // 2. Draw around the drag indicator view, if displayed + // Draw around the drag indicator view, if displayed if presentable?.showDragIndicator == true { let indicatorLeftEdgeXPos = view.bounds.width/2.0 - Constants.dragIndicatorSize.width/2.0 drawAroundDragIndicator(currentPath: path, indicatorLeftEdgeXPos: indicatorLeftEdgeXPos) diff --git a/Tests/PanModalTests.swift b/Tests/PanModalTests.swift index c5cd298..089eb3e 100644 --- a/Tests/PanModalTests.swift +++ b/Tests/PanModalTests.swift @@ -59,6 +59,7 @@ class PanModalTests: XCTestCase { XCTAssertEqual(vc.shouldRoundTopCorners, false) XCTAssertEqual(vc.showDragIndicator, false) XCTAssertEqual(vc.shouldRoundTopCorners, false) + XCTAssertEqual(vc.cornerRadius, 8) } func testPresentableYValues() {