• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS: Using AppDelegate as an app-wide singleton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS: Using AppDelegate as an app-wide singleton


  • Subject: Re: iOS: Using AppDelegate as an app-wide singleton
  • From: Alex Zavatone <email@hidden>
  • Date: Tue, 01 Dec 2015 16:32:17 -0500

I'm more of a fan of special case singletons, or else you essentially create one big global al over again.

Also, the AppDelegate class has certain responsibilities.  For organizational purposes, I feel most comfortable in creating a singleton for the purpose of the task at hand.

On Dec 1, 2015, at 3:58 PM, Carl Hoefs wrote:

> 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


_______________________________________________

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


References: 
 >iOS: Using AppDelegate as an app-wide singleton (From: Carl Hoefs <email@hidden>)

  • Prev by Date: iOS: Using AppDelegate as an app-wide singleton
  • Next by Date: Re: iOS: Using AppDelegate as an app-wide singleton
  • Previous by thread: iOS: Using AppDelegate as an app-wide singleton
  • Next by thread: Re: iOS: Using AppDelegate as an app-wide singleton
  • Index(es):
    • Date
    • Thread