Josh Carter
Josh Carter

Reputation: 131

Parse Query in order of creation in Swift

I am trying to query my Parse database for a list of objects belonging to a User. I'm able to get all the objects, but I want them to appear in my tableView in the order they were created. I have tried using:

query.orderByAscending("createdAt")

but my table always comes out random. Is there a proper way I should be querying or is this something I should be handling client side?

Upvotes: 1

Views: 38

Answers (1)

mert
mert

Reputation: 1098

You can also use PFQueryTableViewController class to manage objects from table, override queryForTable method by returning PFQuery.

Upvotes: 1

Related Questions