Skip to content

I wan to sort the tableView itens to make the last post be the first item in the table #93

@Rovel

Description

@Rovel

Hi,

First of all congrats for the awsome lib!

I'm building something over the Database Example in the quickstart-ios repo on swift:

https://github.com/firebase/quickstart-ios/tree/master/database

I wan to sort the tableView itens to make the last post be the first item in the table

something like thus guy in stackoverflow wants but a little less complex, just the regular reverse order:
http://stackoverflow.com/questions/26148367/swift-start-tableview-from-bottom-reverse-tableview
In my search I've found this method:
// reverse the array
self.objects = self.objects.reverse()

but in the firebaseUI have something different when we'r using the table view (or I'm just lost..)

We have FirebaseUI to build the tableView using (and my interpretation of what each do, please correct me if I'm wrong):

PostDataSource.swift (configure the table view)
PostListViewController.swift (build the basic table)
PostTableViewCell.swift (cell for reuse in may views)
And the specific query to build the dataset for the table:
MyPostsViewController.swift (get the specific dataset array or dict to populate the table)

I've trie to insert the .reverse() in may objects at these files but no one seems to accept it.

So I'm requesting some help here to sort items using the FirebaseUI implementation on tableViews because I really liked the way it builds the tables :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions