There was an error while loading. Please reload this page.
1 parent 40b037f commit 8693182Copy full SHA for 8693182
TextFieldEffects/TextFieldEffects/TextFieldEffects.swift
@@ -77,7 +77,13 @@ open class TextFieldEffects : UITextField {
77
// MARK: - Overrides
78
79
override open func draw(_ rect: CGRect) {
80
- drawViewsForRect(rect)
+// FIXME: Short-circuit if the view is currently selected. iOS 11 introduced
81
+// a setNeedsDisplay when you focus on a textfield, calling this method again
82
+// and messing up some of the effects due to the logic contained inside these
83
+// methods.
84
+// This is just a "quick fix", something better needs to come along.
85
+guard isFirstResponder == false else { return }
86
+drawViewsForRect(rect)
87
}
88
89
override open func drawPlaceholder(in rect: CGRect) {
0 commit comments