iOS: Using AppDelegate as an app-wide singleton
iOS: Using AppDelegate as an app-wide singleton
- Subject: iOS: Using AppDelegate as an app-wide singleton
- From: Carl Hoefs <email@hidden>
- Date: Tue, 01 Dec 2015 13:58:17 -0700
I was about to implement my own singleton class to act as an app-wide context repository, but then I thought: wouldn't it be simpler just to use the appDelegate for that purpose? It's a singleton already and available to all classes via [[UIApplication sharedApplication] delegate]. All I need to do is add my @properties to it and I'm done.
Are there any drawbacks to this?
-Carl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden