Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any technical/conceptual reason why iOS does not support Cocoa Bindings? [closed]

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).

like image 733
Olivier Tabone Avatar asked Jan 16 '11 15:01

Olivier Tabone


1 Answers

Bindings on the desktop requires:

  1. All suitable UI components to expose bindings for their important properties
  2. Implementation of NSArrayController infrastructure for handling selection

On 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.

like image 186
Mike Abdullah Avatar answered Sep 19 '22 03:09

Mike Abdullah