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
Post a Comment