Strange grammar, but I want to ask if there are cases where if I don't KVO (Key Value Observation), the app just can't do certain things/features?
Thanks
Strange grammar, but I want to ask if there are cases where if I don't KVO (Key Value Observation), the app just can't do certain things/features?
Thanks
Key Value Observing offers functionality and behaviors that are unique and certainly useful to a developer, in same cases offering a glimpse at values that are otherwise opaque.
For example, if you want to know the precise duration of an animation in Cocoa that is otherwise a black-box (for example, the keyboard disclosure animation duration), KVO is the only way I know of that you could establish that.
Beyond that, it's a useful pattern for programming applications that involve data (go figure). As such, it is yet another tool in a developer's toolkit.
Can you get by without it? Sure. There are many tools you can get by without, and this one takes a little bit of effort to wrap your head around initially. But should you make a point of avoiding it? No, I don't think so - why would you?
You nearly never need KVO.
Only when you need some special things, or want to circumvent Apple sw design.
And for that few cases, you will find demo code, so dont worry about KVO much.