Singleton to Protocol

from blog TrozWare, | ↗ original
I was driving through the town of Singleton the other day and of course, it got me thinking about using singletons in my apps. Singletons were a commonly used pattern in Objective-C programming and appear in many of Apple’s own APIs, but seem to be increasingly frowned upon in the Swift world. So what is a singleton? # A singleton is a class...