Skip to content

Instantly share code, notes, and snippets.

View mdavalos1993's full-sized avatar
🏠
Working from home

Marcos Davalos mdavalos1993

🏠
Working from home
View GitHub Profile
class Singleton {
// singelton pattern
private static var privateShared : Singleton?
class func shared() -> Singleton {
// make sure we get an instance from the singleton queue
guard let uwShared = read(privateShared) else {
privateShared = Singleton()
return privateShared!