Ordered Arrays with Firebase
问题 As Firebase doesn't guarantee order when reading from a base, we can get unordered output from this async call: -(void)loadDataFromFirebase { handles = [[NSMutableArray alloc] init]; Firebase* listRef = [[Firebase alloc] initWithUrl:@"https://mobilefeast.firebaseIO.com/foodtrucks"]; [listRef observeEventType:FEventTypeChildAdded withBlock:^(FDataSnapshot *snapshot) { NSLog(@"%@", snapshot.name); [handles addObject:snapshot.value]; [self.handleTableView reloadData]; }]; } In the example