Loading…

Publish-Subscribe in Swift

For one of my current projects, I had to implement an event-based messaging system. The first implementation boiled down to a bunch of NSNotificiation and addObserver. But this quickly became messy and the de-coupling was that strong, that debugging would be much less fun (for more on this topic, see also Why NSNotificationCenter is Bad, Read More