     }
 
 }
+
+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
+    }
+    
+}

    var contentView: NibView? {
        return nil
    }
    
    private var innerTextField: UITextField? {
        var innerTextField: UITextField?
        if let contentView = contentView {
            for subview in contentView.subviews {
                if let textField = subview as? UITextField {
                    innerTextField = textField
                    break
                }
            }
        }
        return innerTextField
    }
    
    // MARK: - Init
    
    override init(frame: CGRect) {

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