|
27 | 27 | */
|
28 | 28 |
|
29 | 29 | #import <UIKit/UIKit.h>
|
| 30 | +#import <FirebaseUI/XCodeMacros.h> |
30 | 31 |
|
31 | 32 | #import "FirebaseDataSource.h"
|
32 | 33 |
|
|
40 | 41 | /**
|
41 | 42 | * The model class to coerce FDataSnapshots to (if desired). For instance, if the modelClass is set to [Message class] in Obj-C or Message.self in Swift, then objects of type Message will be returned instead of type FDataSnapshot.
|
42 | 43 | */
|
43 |
| -@property (strong, nonatomic, nonnull) Class modelClass; |
| 44 | +@property (strong, nonatomic, __NON_NULL) Class modelClass; |
44 | 45 |
|
45 | 46 | /**
|
46 | 47 | * The reuse identifier for cells in the UICollectionView.
|
47 | 48 | */
|
48 |
| -@property (strong, nonatomic, nonnull) NSString *reuseIdentifier; |
| 49 | +@property (strong, nonatomic, __NON_NULL) NSString *reuseIdentifier; |
49 | 50 |
|
50 | 51 | /**
|
51 | 52 | * The UICollectionView instance that operations (inserts, removals, moves, etc.) are performed against.
|
52 | 53 | */
|
53 |
| -@property (strong, nonatomic, nonnull) UICollectionView *collectionView; |
| 54 | +@property (strong, nonatomic, __NON_NULL) UICollectionView *collectionView; |
54 | 55 |
|
55 | 56 | /**
|
56 | 57 | * The callback to populate a subclass of UICollectionViewCell with an object provided by the datasource.
|
57 | 58 | */
|
58 |
| -@property (strong, nonatomic, nonnull) void(^populateCell)(__kindof UICollectionViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object); |
| 59 | +@property (strong, nonatomic, __NON_NULL) void(^populateCell)(UICollectionViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object); |
59 | 60 |
|
60 | 61 | /**
|
61 | 62 | * Initialize an instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with FDataSnapshots.
|
|
64 | 65 | * @param collectionView An instance of a UICollectionView to bind to
|
65 | 66 | * @return An instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with FDataSnapshots
|
66 | 67 | */
|
67 |
| -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; |
| 68 | +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; |
68 | 69 |
|
69 | 70 | /**
|
70 | 71 | * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with FDataSnapshots.
|
|
74 | 75 | * @param collectionView An instance of a UICollectionView to bind to
|
75 | 76 | * @return An instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with FDataSnapshots
|
76 | 77 | */
|
77 |
| -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref cellClass:(nullable Class)cell reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; |
| 78 | +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref cellClass:(__NULLABLE Class)cell reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; |
78 | 79 |
|
79 | 80 | /**
|
80 | 81 | * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom xib with FDataSnapshots.
|
|
84 | 85 | * @param collectionView An instance of a UICollectionView to bind to
|
85 | 86 | * @return An instance of FirebaseCollectionViewDataSource that populates a custom xib with FDataSnapshots
|
86 | 87 | */
|
87 |
| -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref nibNamed:(nonnull NSString *)nibName reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; |
| 88 | +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref nibNamed:(__NON_NULL NSString *)nibName reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; |
88 | 89 |
|
89 | 90 | /**
|
90 | 91 | * Initialize an instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with a custom model class.
|
|
94 | 95 | * @param collectionView An instance of a UICollectionView to bind to
|
95 | 96 | * @return An instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with a custom model class
|
96 | 97 | */
|
97 |
| -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; |
| 98 | +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; |
98 | 99 |
|
99 | 100 | /**
|
100 | 101 | * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with a custom model class.
|
|
105 | 106 | * @param collectionView An instance of a UICollectionView to bind to
|
106 | 107 | * @return An instance of FirebaseCollectionViewDataSource that populates a custom subclass of UICollectionViewCell with a custom model class
|
107 | 108 | */
|
108 |
| -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model cellClass:(nullable Class)cell reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; |
| 109 | +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model cellClass:(__NULLABLE Class)cell reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; |
109 | 110 |
|
110 | 111 | /**
|
111 | 112 | * Initialize an instance of FirebaseCollectionViewDataSource that populates a custom xib with a custom model class.
|
|
116 | 117 | * @param collectionView An instance of a UICollectionView to bind to
|
117 | 118 | * @return An instance of FirebaseCollectionViewDataSource that populates a custom xib with a custom model class
|
118 | 119 | */
|
119 |
| -- (nonnull instancetype)initWithRef:(nonnull Firebase *)ref modelClass:(nullable Class)model nibNamed:(nonnull NSString *)nibName reuseIdentifier:(nonnull NSString *)identifier view:(nonnull UICollectionView *)collectionView; |
| 120 | +- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref modelClass:(__NULLABLE Class)model nibNamed:(__NON_NULL NSString *)nibName reuseIdentifier:(__NON_NULL NSString *)identifier view:(__NON_NULL UICollectionView *)collectionView; |
120 | 121 |
|
121 | 122 | /**
|
122 | 123 | * This method populates the fields of a UICollectionViewCell or subclass given an FDataSnapshot (or custom model object).
|
123 | 124 | * @param callback A block which returns an initialized UICollectionViewCell (or subclass) and the corresponding object to populate the cell with.
|
124 | 125 | */
|
125 |
| -- (void)populateCellWithBlock:(nonnull void(^)( __kindof UICollectionViewCell * _Nonnull cell, __kindof NSObject * _Nonnull object))callback; |
| 126 | +- (void)populateCellWithBlock:(__NON_NULL void(^)(UICollectionViewCell * __NON_NULL_PTR cell, NSObject * __NON_NULL_PTR object))callback; |
126 | 127 |
|
127 | 128 | @end
|
0 commit comments