4 ms·
KVO is built-in to iOS, but it has some serious issues. One BIG issue is that you have to register to observe a key in order to de-register from it later. If yo
by natasham25 13y ago
KVO is built-in to iOS, but it has some serious issues. One BIG issue is that you have to register to observe a key in order to de-register from it later. If you never register for the key (because it is dynamic for example), and try to de-register, the app will crash. It's a pretty big issue, and this seems to handle it in a pretty elegant way.
- seivan 13y agoElegant and elegant, the swizzle (alter it in runtime) the class to remove observers on dealloc (afaik I haven't seen the source yet)
- kimon 13y agoThis was the principal motivation behind KVOController. Manually tracking registered observers is tedious and error prone. We hope you give KVOController a try, feedback from the community is welcome.
- morkfromork 13y agoI remove observers within a @try {} @catch{} block. The exceptions are caught and I can fix where necessary.