Re: Getting class when instantiating a singleton

Ben Kennedy

On 30 Aug 2017, at 1:55 pm, Alex Zavatone <zav@...> wrote:

Why is this necessary? Apologies if I'm missing something obvious, but what's wrong with literally using DataSingleton (in your example)?
It makes the code copy/paste-able. No dependency on the name of class you are adding it to.
If saving developer effort is your goal, how about setting up a text snippet in Xcode, so that you can avoid the penalty of needlessly un-typed code?

(By "un-typed" mean in the language sense, not the keyboard sense; pun unintended.)


Join to automatically receive all group messages.