【发布时间】:2014-11-24 04:43:00
【问题描述】:
在我的类 VoteCount 的 Parse 数据控制台上,我有一个名为 objectId 的字符串数据垂直列,并且该类中的每个水平数据行都有一个唯一的 objectId。正如您在此处看到的,我正在从 objectId BiEM17uUYT 检索数据:
var query = PFQuery(className: "VoteCount")
query.getObjectInBackgroundWithId("BiEM17uUYT") {
(voteCount1: PFObject!, error: NSError!) -> Void in
if error != nil {
NSLog("%@", error)
} else {
let votes = voteCount1["votes"] as Int
let votes2 = voteCount1["votes2"] as Int
let option1 = voteCount1["optionName"] as String
let option2 = voteCount1["optionName2"] as String
self.showOption1.text = "\(option1)"
self.showOption2.text = "\(option2)"
}
我只是不知道如何从随机 objectId 调用数据。我只能从特定的 objectId 调用数据,在本例中是 BiEM17uUYT。如何从整列中的随机 objectId 收集所有数据,而不仅仅是 BiEM17uUYT?这将允许我完全从 Parse 更新我的应用数据,而不必不断提交全新的更新。
注意:与“votes”、“votes2”、“optionName”和“optionName2”一样,“objectId”是另一列数据。
【问题讨论】:
标签: ios swift parse-platform