FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Is there a way to sort by child value using FirebaseUI?

Open psopher opened this issue 10 years ago • 1 comments

I am using FirebaseUI for a table view. I know that using Firebase, I can sort by child value, but I can't figure out how to do this using FirebaseUI. Is it possible?

psopher avatar Dec 21 '15 18:12 psopher

@psopher You can simply pass in a query instead of a reference in any of the constructors, for instance:

FQuery *query = [[rootRef queryOrderedByChild:@"foo"] queryEqualToValue:@"bar"];
FirebaseTableViewDataSoource *dataSource = [[FirebaseTableViewDataSource alloc] initWithQuery:query ...];

See https://github.com/firebase/FirebaseUI-iOS/blob/master/FirebaseUI/Core/API/FirebaseTableViewDataSource.h#L243-L391 for the method signatures.

asciimike avatar Dec 23 '15 01:12 asciimike