【发布时间】:2018-05-11 06:44:26
【问题描述】:
我想要两个从 Parse 中快速获取的显示对象数据。我尝试过以这种方式使用标签,但它只显示对象中的最后一个元素。请问如何让它显示标签中对象中的所有元素。就像一个元素到一个标签。谢谢
let query = PFQuery(className: "Questionnaire")
query.findObjectsInBackground { (objects, error) -> Void in
if error == nil {
// There were no errors in the fetch
if let returnedObjects = objects {
// var text = ""
// Objects Array is not nil
// loop through the array to get each object
for object in returnedObjects {
print(object["question"] as! String)
// text.append(object["question"] as! String)
self.Label.text = (object["question"] as! String)
}
}
}
}
【问题讨论】:
-
你可以使用tableview来显示多个标签
标签: swift object parse-platform