Comment avez-vous correctement les données de l'ordre de Firebase chronologiquement

J'essaie de commander mes données à partir de Firebase donc le poste le plus récent est en haut (comme Instagram), mais je ne peux pas le faire fonctionner correctement. Dois-je utiliser un serveur d'horodatage? Est-il un "createdAt" champ?

func getPosts() {
    POST_REF.observeEventType(.Value, withBlock: { snapshot in
        guard let posts = snapshot.value as? [String : [String : String]] else {
            print("No Posts Found")
            return
        }

        Post.feed?.removeAll()
        for (postID, post) in posts {
            let newPost = Post.initWithPostID(postID, postDict: post)!
            Post.feed?.append(newPost)
        }
        Post.feed? = (Post.feed?.reverse())!
        self.tableView.reloadData()
        }, withCancelBlock: { error in
            print(error.localizedDescription)
    })
}
InformationsquelleAutor kerbelda | 2016-05-10