Cocoa for Mac OS X support Cocoa Binding technology, reducing need of glue code between your views and your models.
Recreating Cocoa Bindings on top of KVC on KVO seems doable with the help from cocotron source code.
Is there any technical or conceptual reason why Cocoa Bindings are not part of the SDK ? I'm thinking about performance, lack of garbage collection, lack of KVC support from UI elements (UISlider for instance).
Bindings on the desktop requires:
NSArrayController
infrastructure for handling selectionOn iOS, point 2 becomes less of an issue. It is rare (and perhaps even a bad UI design) to have a master-detail view layout where multiple selection is possible. This is where NSArrayController
really comes into its own.
Bindings for a UITableView become less practical as the current NSArrayController
design doesn't stretch to multiple sections, titles etc.
Point 1 would be useful to have. However it requires a large quantity of work by Apple to implement bindings support in all the UIKit controls. I assume it's never become a high enough priority for them to implement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With