-
-
Save romaonthego/a4cb37195b8cab7f68b5 to your computer and use it in GitHub Desktop.
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 AccountStore { | |
// Doesn't work yet | |
class var sharedStore = ACAccountStore() | |
// This works although I'm unsure of the optional | |
class func sharedStore() -> ACAccountStore { | |
var store: ACAccountStore? = nil | |
var token: dispatch_once_t = 0 | |
dispatch_once(&token, { | |
store = ACAccountStore() | |
}) | |
return store! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment