Answer the question
In order to leave comments, you need to log in
How to select values from Data Parse.com in Swift?
Good afternoon! Poke your nose into a normal manual how to pull out the values in UIViewTable from Data c Parse.com? all that I found is what a dull g .... under Obective C, but I need under Swift
Answer the question
In order to leave comments, you need to log in
In the Swift documentation, click. He himself understood it and video from paid resources.
https://www.parse.com/docs/ios/guide
In general, what you are asking is done like this.
var query = PFQuery(className:"GameScore") //"GameScore" - Название твоего класса в Data
query.whereKey("playerName", equalTo:"Sean Plott") //Отбираются строки в которых поля "playerName" имеют значение "Sean Plott"
query.findObjectsInBackgroundWithBlock {
(objects: [PFObject]?, error: NSError?) -> Void in
if error == nil {
// The find succeeded.
print("Successfully retrieved \(objects!.count) scores.")
// Do something with the found objects
if let objects = objects {
for object in objects {
print(object.objectId)
}
}
} else {
// Log details of the failure
print("Error: \(error!) \(error!.userInfo)")
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question