3 ms·
I enjoy using blocks in provided API, as well as writing some of my own private API with them. The code locality is very nice for many things like enumeration a
by pirateking 14y ago
I enjoy using blocks in provided API, as well as writing some of my own private API with them. The code locality is very nice for many things like enumeration and animation.
As for notifying objects of state changes, all three methods are used. I use NSNotificationCenter if there will be multiple objects who may need to know about it, KVO as glue for the model and the view, and delegate messaging if there is only one object to notify.