Skip to content

Commit

Permalink
Merge pull request #233 from morganchen12/spooky-action
Browse files Browse the repository at this point in the history
allow consumers to manually set table view and collection view on data sources
  • Loading branch information
morganchen12 authored Feb 2, 2017
2 parents e3eff7b + 50d74b8 commit 16094ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions FirebaseDatabaseUI/FUICollectionViewDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The UICollectionView instance that operations (inserts, removals, moves,
* etc.) are performed against. The data source does not claim ownership of
* the collection view it populates.
* the collection view it populates. This collection view must be receiving data
* from this data source otherwise data inconsistency crashes will occur.
*/
@property (nonatomic, readonly, weak) UICollectionView *collectionView;
@property (nonatomic, readwrite, weak, nullable) UICollectionView *collectionView;

/**
* The callback to populate a subclass of UICollectionViewCell with an object
Expand Down
7 changes: 4 additions & 3 deletions FirebaseDatabaseUI/FUITableViewDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ NS_ASSUME_NONNULL_BEGIN
* FUITableViewDataSource provides a class that conforms to the
* UITableViewDataSource protocol which allows UITableViews to implement
* FUITableViewDataSource in order to provide a UITableView synchronized
* to a Firebase reference or query.
* to a Firebase reference or query.
*/
@interface FUITableViewDataSource : FUIDataSource<UITableViewDataSource>

/**
* The UITableView instance that operations (inserts, removals, moves, etc.) are
* performed against.
* performed against. This collection view must be receiving data from
* this data source otherwise data inconsistency crashes will occur.
*/
@property (nonatomic, readonly, weak) UITableView *tableView;
@property (nonatomic, readwrite, weak, nullable) UITableView *tableView;

/**
* The callback used by the data source to populate the table view.
Expand Down
2 changes: 0 additions & 2 deletions FirebaseDatabaseUI/FUITableViewDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

@interface FUITableViewDataSource ()

@property (nonatomic, readwrite, weak) UITableView *tableView;

@property(strong, nonatomic, readwrite) UITableViewCell *(^populateCell)
(UITableView *tableView, NSIndexPath *indexPath, FIRDataSnapshot *snap);

Expand Down

0 comments on commit 16094ab

Please sign in to comment.