@@ -58,23 +58,28 @@ NS_ASSUME_NONNULL_BEGIN
58
58
* provided by the datasource.
59
59
*/
60
60
@property (strong , nonatomic , readonly ) UICollectionViewCell *(^populateCellAtIndexPath)
61
- (NSIndexPath *indexPath, UICollectionView *collectionView , FIRDataSnapshot *object);
61
+ (UICollectionView *collectionView, NSIndexPath *indexPath , FIRDataSnapshot *object);
62
62
63
63
/* *
64
64
* Initialize an instance of FirebaseCollectionViewDataSource that populates
65
- * UICollectionViewCells
66
- * with FIRDataSnapshots.
67
- * @param query A Firebase query to bind the datasource to
68
- * @param collectionView An instance of a UICollectionView to bind to
65
+ * UICollectionViewCells with FIRDataSnapshots.
66
+ * @param query A Firebase query to bind the data source to.
67
+ * @param collectionView An instance of a UICollectionView to bind to. This view
68
+ * is not retained by its data source.
69
+ * @param populateCell A closure used by the data source to create the cells that
70
+ * are displayed in the collection view. This closure is retained by the data
71
+ * source, so if you capture self in the closure and also claim ownership of the
72
+ * data source, be sure to avoid retain cycles by capturing a weak reference to self.
69
73
* @return An instance of FirebaseCollectionViewDataSource that populates
70
- * UICollectionViewCells with
71
- * FIRDataSnapshots
74
+ * UICollectionViewCells with FIRDataSnapshots.
72
75
*/
73
76
- (instancetype )initWithQuery : (FIRDatabaseQuery *)query
74
77
view : (UICollectionView *)collectionView
75
- populateCell : (UICollectionViewCell * (^)(NSIndexPath *indexPath,
76
- UICollectionView *collectionView,
77
- FIRDataSnapshot *object))populateCell ;
78
+ populateCell : (UICollectionViewCell *(^)(UICollectionView *collectionView,
79
+ NSIndexPath *indexPath,
80
+ FIRDataSnapshot *object))populateCell NS_DESIGNATED_INITIALIZER;
81
+
82
+ - (instancetype )initWithArray : (FirebaseArray *)array NS_UNAVAILABLE;
78
83
79
84
@end
80
85
0 commit comments