Masterclass: KVC magic tricks
KVO is very, very dangerous. No matter how skillful you believe to be, strive to avoid it as much as you can.
If you really need KVO, then use Facebook’s KVOController. Don’t ever attempt to write the required code on your own. Just look at the source code of this Facebook’s bag of voodoo if you need reasons.
Don’t ever use KVO to monitor changes in Core Data objects.
Core Data change propagation is another bag of voodoo and you don’t want to meddle there. If you need such functionality, use NSManagedObjectContextObjectsDidChangeNotification
instead.
KVC Level: The Master
KVC is very, very useful and combined with NSPredicate it’s source of considerable Obj-C power.
Kool-aid here:
- KVC Collection Operators on NS Hipster
- NSCookbook 26: Using Collection Operators
- Flatten an NSArray on SO
- How can I most easily flatten a three-dimensional array in Cocoa?
- Useful NSArray category
and many more.
KVC Level: The Dark Lord
No words for these, just awe…