var users = [""] // This is a temporary Array for storing the data from Parse.
@IBOutlet var messageTableView: UITableView!
// The TableView will output the data in the array.
override func viewDidLoad() {
super.viewDidLoad()
var query = PFUser.query()
query!.findObjectsInBackgroundWithBlock({(objects:[AnyObject]?, error:NSError?) -> Void in
self.users.removeAll(keepCapacity: true)
//Delete Array Data..
for object in objects! {
var posts:PFUser = object as! PFUser
self.users.append(posts.username!)
//and append data to Array.
}
self.messageTableView.reloadData()}
My question :
This data is loaded from the "Users" class. But what I want is to load the data in the "posts" Class, what do you do? This is my first question raised in Stackoverflow. Please take care of me. : -) Haha