I like to do this:
//in .pch file
Then somewhere I need to ask appDelegate, something that I just say
[APPDELEGATE() someMethod]
Having the AppDelegate property somewhere else seems like a bad idea. I can’t say why, except for already having a simple way to get this link (sharedApplication).
In this case, this is probably just for the convenience of the developer. However, I have to say that the “need” for AppDelegate references everywhere is probably more an indication of spaghetti code and bad encapsulation.
* By the way, I store references to some "global" variables inside appDelegate, which can also be an indicator of poor encapsulation ... that's why I use the APPDELEGATE () expression first ;-)
** Things like NSDateFormatter, which you will need quite often, but not necessarily “live” inside the class (you do not need one for each instance, but can be applied to several instances) or a link to some specific state, for example, “global font size applications "
source share