Skip to content

Commit 6eb62bc

Browse files
committed
Cleaned up Madoka
1 parent 6e92d78 commit 6eb62bc

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

TextFieldEffects/TextFieldEffects/MadokaTextField.swift

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ import UIKit
115115
path.addLine(to: CGPoint(x: rect.origin.x + borderThickness, y: rect.origin.y + borderThickness))
116116
path.close()
117117
borderLayer.path = path.cgPath
118-
borderLayer.lineCap = convertToCAShapeLayerLineCap(convertFromCAShapeLayerLineCap(CAShapeLayerLineCap.square))
118+
borderLayer.lineCap = .square
119119
borderLayer.lineWidth = borderThickness
120120
borderLayer.fillColor = nil
121121
borderLayer.strokeColor = borderColor?.cgColor
@@ -177,18 +177,7 @@ import UIKit
177177

178178
override open func textRect(forBounds bounds: CGRect) -> CGRect {
179179
let newBounds = rectForBorder(bounds)
180-
181180
return newBounds.insetBy(dx: textFieldInsets.x, dy: 0)
182181
}
183182

184183
}
185-
186-
// Helper function inserted by Swift 4.2 migrator.
187-
fileprivate func convertToCAShapeLayerLineCap(_ input: String) -> CAShapeLayerLineCap {
188-
return CAShapeLayerLineCap(rawValue: input)
189-
}
190-
191-
// Helper function inserted by Swift 4.2 migrator.
192-
fileprivate func convertFromCAShapeLayerLineCap(_ input: CAShapeLayerLineCap) -> String {
193-
return input.rawValue
194-
}

0 commit comments

Comments
 (0)