Skip to content

Commit f69a4db

Browse files
committed
1 parent 48008fd commit f69a4db

6 files changed

+18
-14
lines changed

Diff for: FirebaseUI/API/FirebaseArray.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
/**
5454
* The delegate object that array changes are surfaced to.
5555
*/
56-
@property (strong, nonatomic) __GENERIC(NSMutableArray, FDataSnapshot *) *snapshots;
56+
@property (strong, nonatomic) NSMutableArray __GENERIC(FDataSnapshot *) *snapshots;
5757

5858
#pragma mark -
5959
#pragma mark Initializer methods

Diff for: FirebaseUI/API/FirebaseCollectionViewDataSource.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
/**
6767
* The callback to populate a subclass of UICollectionViewCell with an object provided by the datasource.
6868
*/
69-
@property (strong, nonatomic, __NON_NULL) void(^populateCell)(__kindof UICollectionViewCell * __NON_NULL_PTR cell, __kindof NSObject * __NON_NULL_PTR object);
69+
@property (strong, nonatomic, __NON_NULL) void(^populateCell)(__KINDOF UICollectionViewCell * __NON_NULL_PTR cell, __KINDOF NSObject * __NON_NULL_PTR object);
7070

7171
/**
7272
* Initialize an instance of FirebaseCollectionViewDataSource that populates UICollectionViewCells with FDataSnapshots.
@@ -152,6 +152,6 @@
152152
* This method populates the fields of a UICollectionViewCell or subclass given an FDataSnapshot (or custom model object).
153153
* @param callback A block which returns an initialized UICollectionViewCell (or subclass) and the corresponding object to populate the cell with.
154154
*/
155-
- (void)populateCellWithBlock:(__NON_NULL void(^)(__kindof UICollectionViewCell * __NON_NULL_PTR cell, __kindof NSObject * __NON_NULL_PTR object))callback;
155+
- (void)populateCellWithBlock:(__NON_NULL void(^)(__KINDOF UICollectionViewCell * __NON_NULL_PTR cell, __KINDOF NSObject * __NON_NULL_PTR object))callback;
156156

157157
@end

Diff for: FirebaseUI/API/FirebaseTableViewDataSource.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
/**
6262
* The callback to populate a subclass of UITableViewCell with an object provided by the datasource.
6363
*/
64-
@property (strong, nonatomic, __NON_NULL) void(^populateCell)(__kindof UITableViewCell * __NON_NULL_PTR cell, __kindof NSObject * __NON_NULL_PTR object);
64+
@property (strong, nonatomic, __NON_NULL) void(^populateCell)(__KINDOF UITableViewCell * __NON_NULL_PTR cell, __KINDOF NSObject * __NON_NULL_PTR object);
6565

6666
/**
6767
* Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with FDataSnapshots.
@@ -147,7 +147,7 @@
147147
* This method populates the fields of a UITableViewCell or subclass given a model object (or FDataSnapshot).
148148
* @param callback A block which returns an initialized UITableViewCell (or subclass) and the corresponding object to populate the cell with.
149149
*/
150-
- (void)populateCellWithBlock:(nonnull void (^)(__kindof UITableViewCell * __NON_NULL_PTR cell, __kindof NSObject * __NON_NULL_PTR object))callback;
150+
- (void)populateCellWithBlock:(nonnull void (^)(__KINDOF UITableViewCell * __NON_NULL_PTR cell, __KINDOF NSObject * __NON_NULL_PTR object))callback;
151151

152152
@end
153153

Diff for: FirebaseUI/Implementation/FirebaseCollectionViewDataSource.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ -(NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfIt
169169
return [self.array count];
170170
}
171171

172-
- (void)populateCellWithBlock:(__NON_NULL void(^)(__kindof UICollectionViewCell * __NON_NULL_PTR cell, __kindof NSObject * __NON_NULL_PTR object))callback;
172+
- (void)populateCellWithBlock:(__NON_NULL void(^)(__KINDOF UICollectionViewCell * __NON_NULL_PTR cell, __KINDOF NSObject * __NON_NULL_PTR object))callback;
173173
{
174174
self.populateCell = callback;
175175
}

Diff for: FirebaseUI/Implementation/FirebaseTableViewDataSource.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
172172
return [self.array count];
173173
}
174174

175-
- (void)populateCellWithBlock:(nonnull void (^)(__kindof UITableViewCell * __NON_NULL_PTR cell, __kindof NSObject * __NON_NULL_PTR object))callback;
175+
- (void)populateCellWithBlock:(nonnull void (^)(__KINDOF UITableViewCell * __NON_NULL_PTR cell, __KINDOF NSObject * __NON_NULL_PTR object))callback;
176176
{
177177
self.populateCell = callback;
178178
}

Diff for: FirebaseUI/XCodeMacros.h

+11-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#ifndef XCodeMacros_h
3030
#define XCodeMacros_h
3131

32-
#if __has_feature(nullability)
32+
#if defined(__has_feature) && __has_feature(nullability)
3333
# define __ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
3434
# define __ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
3535
# define __NULLABLE nullable
@@ -45,12 +45,16 @@
4545
# define __NON_NULL_PTR
4646
#endif
4747

48-
#if __has_feature(objc_generics)
49-
# define __GENERIC(class, ...) class<__VA_ARGS__>
50-
# define __GENERIC_TYPE(type) type
48+
#if defined(__has_feature) && __has_feature(objc_generics)
49+
# define __GENERIC(...) <__VA_ARGS__>
5150
#else
52-
# define __GENERIC(class, ...) class
53-
# define __GENERIC_TYPE(type) id
51+
# define __GENERIC(...)
5452
#endif
5553

56-
#endif /* XCodeMacros_h */
54+
#if defined(__has_feature) && __has_feature(objc_kindof)
55+
# define __KINDOF __kindof
56+
#else
57+
# define __KINDOF
58+
#endif
59+
60+
#endif

0 commit comments

Comments
 (0)