Skip to content

Transforms #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 24, 2017
Merged

Transforms #186

merged 16 commits into from
Jan 24, 2017

Conversation

morganchen12
Copy link
Contributor

@morganchen12 morganchen12 commented Oct 31, 2016

Add support for defining transformations (i.e. sort) on the data from FirebaseDatabase before it's presented in a table/collection view. Still missing a few things. Addresses #183, depends on #184. Also allows for consumers to create their own collections.

  • Doc comments
  • DRY code in collections
  • Tests

@mcdonamp please review

@morganchen12 morganchen12 force-pushed the transforms branch 4 times, most recently from ac9c308 to d612ac1 Compare November 7, 2016 20:03
@morganchen12
Copy link
Contributor Author

cc @puf, who may have opinions on this


@optional

/**
* Called before any other events are sent.
*/
- (void)arrayDidBeginUpdates:(id<FUICollection>)collection;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally did not add a "begin updates" event, but only a "we're done with all updates". What do you think you would catch in this method that you would catch with a simple "is this the first update?" check?

Copy link
Contributor Author

@morganchen12 morganchen12 Jan 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to better mirror the UIKit aggregation methods of beginUpdates and endUpdates. This makes it easier for consumers, so they don't have to track their own local state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect it's ok to drop the beginUpdates event if the platform doesn't call for it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants