Created
September 25, 2015 13:21
-
-
Save cocoaNib/e9603fa491218a0f95d9 to your computer and use it in GitHub Desktop.
Singleton swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Singelton { | |
static let sharedInstance = Singelton() | |
private init(){} | |
} | |
// Learned from this great blog post | |
// http://krakendev.io/blog/the-right-way-to-write-a-singleton |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment