Skip to content

Commit

Permalink
Fixes RACCommunity#129 - UITextField's text bindable property should …
Browse files Browse the repository at this point in the history
…be of optional type
  • Loading branch information
dmcrodrigues committed Jul 6, 2016
1 parent 56b0cbf commit 5123869
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/UIKit/UITextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import UIKit
extension UITextField {

/// Wraps a textField's `text` value in a bindable property.
public var rex_text: MutableProperty<String> {
let getter: UITextField -> String = { $0.text ?? "" }
let setter: (UITextField, String) -> () = { $0.text = $1 }
public var rex_text: MutableProperty<String?> {
let getter: UITextField -> String? = { $0.text }
let setter: (UITextField, String?) -> () = { $0.text = $1 }
#if os(iOS)
return UIControl.rex_value(self, getter: getter, setter: setter)
#else
Expand Down

0 comments on commit 5123869

Please sign in to comment.