pr comments

This commit is contained in:
Marco Cancellieri 2019-03-14 21:35:20 +01:00
parent d0b094292f
commit 0da0a44c4a
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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() {