This question already has an answer here:
- How to Create Singleton Object in swift 3 answers
Is this the best approach to create singleton using swift ?
class SingletonClass {
static let sharedInstance = SingletonClass()
private init() {
}
}
Aucun commentaire:
Enregistrer un commentaire