Created
November 19, 2014 20:00
-
-
Save thinkclay/9a3a6301cd0762d09a77 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 SingletonClass | |
| { | |
| class var shared : SingletonClass | |
| { | |
| struct Static | |
| { | |
| static let instance : SingletonClass = SingletonClass() | |
| } | |
| return Static.instance | |
| } | |
| } | |
| | |
| let instance = SingletonClass.shared |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment