2 ms·
Code that relies on notifications for control flow is very hard to debug and reason about. Much better to set up explicit delegate/observer protocols between pa
by cageface 11y ago
Code that relies on notifications for control flow is very hard to debug and reason about. Much better to set up explicit delegate/observer protocols between parts of your app that need to communicate with each other. You can use something like NSHashTable to manage weak references to a collection of observers that conform to your delegate protocol.