4 ms·
This article echoes the same idea (instead of big singleton, view controllers should accept the data they require in their initializer (constructor)) and gives
by evanspa 13y ago
This article echoes the same idea (instead of big singleton, view controllers should accept the data they require in their initializer (constructor)) and gives some reasons why to do it this way:
http://www.hollance.com/2012/02/dont-abuse-the-app-delegate/ http://www.hollance.com/2012/02/dont-abuse-the-app-delegate/
- sdegutis 13y agoThis is mostly an argument against making AppDelegate into a God object, which I totally agree with. It's not saying singletons themselves are inherently bad. It does generalize saying that they usually make it difficult to evolve an app's internals, but I disagree with that. As long as they're chosen when appropriate, and used properly, there's no problem.