Search code examples
iosmacosdata-bindingkey-value-observingkey-value-coding

Databinding in iOS/OSX frameworks


I wonder if there is any frameworks I'm not aware that I can use to achieve the concept of databinding, bind a NSObject derived class (the model) to a UIControl/NSControl derived component properties.

For example I have a class with a property name and I need to bind it to a UITextView text property so that when the model's name property changes the UITextView text property updates.

I guess that there would be something built on the Key-Value Observing concept.

I would like something that is working in both OSX and iOS or any other related frameworks for the platforms.

Thank you.


Solution

  • You're looking for ReactiveCocoa - super awesome framework that does exactly what you asked for and more. Also a good way to implement MVVM - they have cool extensions that enable that ReactiveViewModel as well as extensions for AFNetworking