Skip to content

Commit 5a5b7bf

Browse files
authored
Merge pull request #19 from luximetr/textfield_bug_ios_10
Fix issue where the textfield would be cleared when losing focus iOS 10
2 parents 764a73d + 04dd047 commit 5a5b7bf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Source/TextInput/TextInputField/TextInputField.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ open class TextInputField: AttributedTextInputField, TextInput {
2828
// MARK: - Unavailable fields
2929
@available(*, unavailable, message: "use content instead")
3030
open override var text: String? {
31-
set {}
32-
get { return nil }
31+
set { content = newValue }
32+
get { return content }
3333
}
34-
34+
3535
@available(*, unavailable, message: "use attributedContent instead")
3636
open override var attributedText: NSAttributedString? {
37-
set {}
38-
get { return nil }
37+
set { attributedContent = newValue }
38+
get { return attributedContent }
3939
}
40-
40+
4141
@available(*, unavailable, message: "use textInputDelegates and textInputFieldDelegates instead")
4242
open override var delegate: UITextFieldDelegate? {
4343
set {}

0 commit comments

Comments
 (0)