Created
July 28, 2015 05:18
-
-
Save mattneary/ced26bcf2008b8cfc1e6 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
let testObject = PFObject(className: "User") | |
testObject["name"] = "Matt" | |
testObject["location"] = "asdfasdfasdf" | |
testObject["id"] = "1" | |
testObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in | |
println("Object has been saved.") | |
} | |
let testObject = PFObject(className: "Event") | |
testObject["for_user"] = "1" | |
testObject["event_name"] = "asdf" | |
testObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in | |
println("Object has been saved.") | |
} | |
let q = PFQuery(className: "User").whereKey("id", equalTo: "1") | |
let objs = q.findObjects() | |
objs[0]["name"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment