why we should do prevent to make singleton instances in ios, swift -


can please explain reason prevent instance in singleton.

i saw says below

private override init (){  } 

but works fine if or not.

i'm not sure mean question, if you're asking why initialiser private comes definition of singleton design pattern. initialiser needs private make sure nobody can crate instance of singleton.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -