Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Bindable<T> {
- var value: T? {
- didSet {
- observer?(value)
- }
- }
- var observer: ((T?) -> ())?
- func bind(observer: @escaping (T?) -> ()) {
- self.observer = observer
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement