Should I use Cocoa bindings for my latest project?

前端 未结 7 739
执念已碎
执念已碎 2020-12-25 08:45

I\'m starting a project which I think would benefit from bindings (I\'ve got a source list table, several browser views, etc), but I think it would also be quite doable, and

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-25 09:02

    Bindings can seem magical in nature. To understand the magic behind bindings, I think one must understand KVC/KVO thoroughly. I really do mean thoroughly.

    However, in my case (new to Obj-C -- 9 months), once I got KVC/KVO bindings was a thrill. It has significantly reduced my glue code and made my life significantly easier. Debugging bindings became a case of making sure my key-value changes were observable. I find that I am able to spend more time writing what my app is supposed to do rather than making sure the view reflects the data.

    I do agree though that bindings is highly intimidating at first.

提交回复
热议问题