Created
March 12, 2015 16:43
-
-
Save Ben-G/fb4b586f59d43179c841 to your computer and use it in GitHub Desktop.
Workaround for: 'PFObject' does not have a member named 'subscript'
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
// Workaround for Parse 1.6.4 and Xcode 6.3, see: http://stackoverflow.com/questions/28953306/pfobject-does-not-have-a-member-named-subscript/29015269#29015269 | |
extension PFObject { | |
subscript(index: String) -> AnyObject? { | |
get { | |
return self.valueForKey(index) | |
} | |
set(newValue) { | |
if let newValue: AnyObject = newValue { | |
self.setValue(newValue, forKey: index) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment