Sean Clark Hess Sean Clark Hess - 5 months ago 44
iOS Question

Alternative Data-Binding library for Objective-C? (like AngularJS)?

Data binding is an awesome abstraction. I use it all the time in AngularJS and it makes apps much simpler. I'm trying to write an iOS app that uses data binding extensively (a game in this case), but KVO is giving me grief. What library implements better data binding for objective-c? Specifically it should:

  • Have weak references, so you don't have to override dealloc

  • Defer firing bindings: if you set the property multiple times in a function, it fires once

  • Defer firing bindings: if you set multiple bound properties in a function, it waits until all are set before firing any (so order doesn't matter)

  • Better syntax: don't stick all the observers together (requiring a big if-else)

  • Better syntax: use blocks?


Reactive Cocoa looks amazing:

I haven't tried enough to tell if it satisfies #2 and #3, but I hope so.