Skip to content

Instantly share code, notes, and snippets.

@davideme
Last active May 3, 2016 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davideme/4912df68b09a4114cfaca20e97a8003e to your computer and use it in GitHub Desktop.
Save davideme/4912df68b09a4114cfaca20e97a8003e to your computer and use it in GitHub Desktop.
Add square brackets syntax to AWSCognitoDataset
extension AWSCognitoDataset {
subscript(index: String) -> String {
get {
return self.stringForKey(index)
}
set(newValue) {
self.setString(newValue, forKey: index)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment