     }
 
 }
+
+private extension UIView {
+    
+    var subviewTextField: UITextField? {
+        var textField: UITextField?
+        for subview in subviews {
+            if let possible = subview as? UITextField {
+                textField = possible
+            } else if let possible = subview.subviewTextField {
+                textField = possible
+            }
+            if textField != nil {
+                break
+            }
+        }
+        return textField
+    }
+    
+}

    
    override func textRectForBounds(bounds: CGRect) -> CGRect {
        let rect = innerTextField?.frame ?? super.textRectForBounds(bounds)
        return rect
    }
    
    override func editingRectForBounds(bounds: CGRect) -> CGRect {
        let rect = innerTextField?.frame ?? super.editingRectForBounds(bounds)
        return rect
    }
    
    // MARK: UIView

            addSubview(contentView)
            contentView.pinToSuperviewEdges()
            contentView.userInteractionEnabled = false
            borderStyle = .None
            absorbInnerTextField()
        }
    }
    
    private func absorbInnerTextField() {
        if let innerTextField = subviewTextField {
            innerTextField.hidden = true
            defaultTextAttributes = innerTextField.defaultTextAttributes
        }
    }
    
