Re: AppDelegate vs Custom View Controllers for Download Task...
Re: AppDelegate vs Custom View Controllers for Download Task...
- Subject: Re: AppDelegate vs Custom View Controllers for Download Task...
- From: Alex Zavatone <email@hidden>
- Date: Tue, 16 Jun 2015 21:00:41 -0400
Why not just create a singleton to manage the processes?
Putting it in the appDelegate sounds like "I'm putting it there because I don't know where else to put it".
Declare an object that exists as long as you need it to, put the code in there, dispose of it when you don't need it anymore.
On Jun 16, 2015, at 6:37 PM, Peters, Brandon wrote:
> Hi,
>
> I have “duplicate” code for downloading a DB file in two custom view controllers that I think would be better served if the download were initiated when the App launches on the iPhone/iPad. My plan is to make the AppDelegate a delegate of NSURL session (and the various other NSURL delegate stuff it would need) Is there any “known” danger in making the AppDelegate a NSURL session delegate?
>
> Sorry for wording.
>
> _______________________________________________
>
> 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