Created
November 25, 2018 14:51
-
-
Save ShoMasegi/855a8dff8b37b3a527e3503e6cb9edc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RxCocoa | |
import RxSwift | |
import UIKit | |
final class FilledTextFieldDelegateProxy: | |
DelegateProxy<FilledTextField, FilledTextFieldDelegate>, | |
FilledTextFieldDelegate, | |
DelegateProxyType { | |
init(filledTextField: FilledTextField) { | |
super.init(parentObject: filledTextField, delegateProxy: FilledTextFieldDelegateProxy.self) | |
} | |
static func registerKnownImplementations() { | |
register { FilledTextFieldDelegateProxy(filledTextField: $0) } | |
} | |
static func currentDelegate(for object: FilledTextField) -> FilledTextFieldDelegate? { | |
return object.delegate | |
} | |
static func setCurrentDelegate(_ delegate: FilledTextFieldDelegate?, to object: FilledTextField) { | |
object.delegate = delegate | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment