Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit e300149

Browse files
committed
Remove all usages of PF_GENERIC macro.
1 parent fd9f852 commit e300149

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

ParseUI/Classes/LogInViewController/PFLogInViewController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN
7272
7373
If unspecified, the default is basic facebook permissions.
7474
*/
75-
@property (nullable, nonatomic, copy) NSArray PF_GENERIC(NSString *)*facebookPermissions;
75+
@property (nullable, nonatomic, copy) NSArray<NSString *> *facebookPermissions;
7676

7777
/**
7878
The sign up controller if sign up is enabled.

ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
NS_ASSUME_NONNULL_BEGIN
2828

29-
@class BFTask PF_GENERIC(__covariant BFGenericType);
29+
@class BFTask<__covariant BFGenericType>;
3030
@class PFCollectionViewCell;
3131
@class PFObject;
3232
@class PFQuery;
@@ -127,7 +127,7 @@ NS_ASSUME_NONNULL_BEGIN
127127
/**
128128
The array of instances of `PFObject` that is used as a data source.
129129
*/
130-
@property (nonatomic, copy, readonly) NSArray PF_GENERIC(__kindof PFObject *)*objects;
130+
@property (nonatomic, copy, readonly) NSArray<__kindof PFObject *> *objects;
131131

132132
/**
133133
Returns an object at a particular indexPath.
@@ -149,7 +149,7 @@ NS_ASSUME_NONNULL_BEGIN
149149
/**
150150
Removes all objects at the specified index paths, animated.
151151
*/
152-
- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexes;
152+
- (void)removeObjectsAtIndexPaths:(nullable NSArray<NSIndexPath *> *)indexes;
153153

154154
///--------------------------------------
155155
/// @name Loading Data
@@ -160,7 +160,7 @@ NS_ASSUME_NONNULL_BEGIN
160160
161161
@return An awaitable task that completes when the reload succeeds
162162
*/
163-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects;
163+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects;
164164

165165
/**
166166
Loads the objects of the `PFObject.parseClassName` at the specified page and appends it to the
@@ -171,7 +171,7 @@ NS_ASSUME_NONNULL_BEGIN
171171
172172
@return An awaitable task that completes when the reload succeeds
173173
*/
174-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear;
174+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects:(NSInteger)page clear:(BOOL)clear;
175175

176176
/**
177177
Loads the next page of objects, appends to table, and refreshes.

ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
static NSString *const PFQueryCollectionViewNextPageReusableViewIdentifier = @"nextPageView";
3737

3838
@interface PFQueryCollectionViewController () {
39-
NSMutableArray PF_GENERIC(PFObject *)*_mutableObjects;
39+
NSMutableArray<PFObject *> *_mutableObjects;
4040

4141
BOOL _firstLoad; // Whether we have loaded the first set of objects
4242
NSInteger _currentPage; // The last page that was loaded
@@ -226,18 +226,18 @@ - (void)removeObjectsAtIndexPaths:(NSArray *)indexPaths {
226226
#pragma mark -
227227
#pragma mark Loading Data
228228

229-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects {
229+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects {
230230
return [self loadObjects:0 clear:YES];
231231
}
232232

233-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear {
233+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects:(NSInteger)page clear:(BOOL)clear {
234234
self.loading = YES;
235235
[self objectsWillLoad];
236236

237237
PFQuery *query = [self queryForCollection];
238238
[self _alterQuery:query forLoadingPage:page];
239239

240-
BFTaskCompletionSource PF_GENERIC(NSArray<__kindof PFObject *>*)*source = [BFTaskCompletionSource taskCompletionSource];
240+
BFTaskCompletionSource<NSArray<__kindof PFObject *> *> *source = [BFTaskCompletionSource taskCompletionSource];
241241
[query findObjectsInBackgroundWithBlock:^(NSArray *foundObjects, NSError *error) {
242242
if (![Parse isLocalDatastoreEnabled] &&
243243
query.cachePolicy != kPFCachePolicyCacheOnly &&

ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
NS_ASSUME_NONNULL_BEGIN
2828

29-
@class BFTask PF_GENERIC(__covariant BFGenericType);
29+
@class BFTask<__covariant BFGenericType>;
3030
@class PFObject;
3131
@class PFQuery;
3232
@class PFTableViewCell;
@@ -149,7 +149,7 @@ NS_ASSUME_NONNULL_BEGIN
149149
/**
150150
The array of instances of `PFObject` that is used as a data source.
151151
*/
152-
@property (nullable, nonatomic, copy, readonly) NSArray PF_GENERIC(__kindof PFObject *)*objects;
152+
@property (nullable, nonatomic, copy, readonly) NSArray<__kindof PFObject *> *objects;
153153

154154
/**
155155
Returns an object at a particular indexPath.
@@ -176,12 +176,12 @@ NS_ASSUME_NONNULL_BEGIN
176176
/**
177177
Removes all objects at the specified index paths, animated.
178178
*/
179-
- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexPaths;
179+
- (void)removeObjectsAtIndexPaths:(nullable NSArray<NSIndexPath *> *)indexPaths;
180180

181181
/**
182182
Removes all objects at the specified index paths, with or without animation.
183183
*/
184-
- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexPaths animated:(BOOL)animated;
184+
- (void)removeObjectsAtIndexPaths:(nullable NSArray<NSIndexPath *> *)indexPaths animated:(BOOL)animated;
185185

186186
/**
187187
Clears the table of all objects.
@@ -193,7 +193,7 @@ NS_ASSUME_NONNULL_BEGIN
193193
194194
@return An awaitable task that completes when the reload succeeds
195195
*/
196-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)loadObjects;
196+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects;
197197

198198
/**
199199
Loads the objects of the className at the specified page and appends it to the
@@ -204,7 +204,7 @@ NS_ASSUME_NONNULL_BEGIN
204204
205205
@return An awaitable task that completes when the reload succeeds
206206
*/
207-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)loadObjects:(NSInteger)page clear:(BOOL)clear;
207+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects:(NSInteger)page clear:(BOOL)clear;
208208

209209
/**
210210
Loads the next page of objects, appends to table, and refreshes.

ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibB
4545
@end
4646

4747
@interface PFQueryTableViewController () {
48-
NSMutableArray PF_GENERIC(PFObject *)*_mutableObjects;
48+
NSMutableArray<PFObject *> *_mutableObjects;
4949

5050
BOOL _firstLoad; // Whether we have loaded the first set of objects
5151
NSInteger _currentPage; // The last page that was loaded
@@ -212,18 +212,18 @@ - (void)clear {
212212
_currentPage = 0;
213213
}
214214

215-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects {
215+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects {
216216
return [self loadObjects:0 clear:YES];
217217
}
218218

219-
- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear {
219+
- (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects:(NSInteger)page clear:(BOOL)clear {
220220
self.loading = YES;
221221
[self objectsWillLoad];
222222

223223
PFQuery *query = [self queryForTable];
224224
[self _alterQuery:query forLoadingPage:page];
225225

226-
BFTaskCompletionSource PF_GENERIC(NSArray<__kindof PFObject *>*)*source = [BFTaskCompletionSource taskCompletionSource];
226+
BFTaskCompletionSource<NSArray<__kindof PFObject *> *> *source = [BFTaskCompletionSource taskCompletionSource];
227227
[query findObjectsInBackgroundWithBlock:^(NSArray *foundObjects, NSError *error) {
228228
if (![Parse isLocalDatastoreEnabled] &&
229229
query.cachePolicy != kPFCachePolicyCacheOnly &&
@@ -558,7 +558,7 @@ - (void)_refreshControlValueChanged:(UIRefreshControl *)refreshControl {
558558
#pragma mark -
559559
#pragma mark Accessors
560560

561-
- (NSArray PF_GENERIC(__kindof PFObject *)*)objects {
561+
- (NSArray<__kindof PFObject *> *)objects {
562562
return _mutableObjects;
563563
}
564564

ParseUI/Classes/SignUpViewController/PFSignUpViewController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ extern NSString *const PFSignUpCancelNotification;
127127
128128
@return A `BOOL` indicating whether the sign up should proceed.
129129
*/
130-
- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary PF_GENERIC(NSString *,NSString *)*)info;
130+
- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary<NSString *, NSString *> *)info;
131131

132132
///--------------------------------------
133133
/// @name Responding to Actions

ParseUI/Classes/Views/PFImageView.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
2929

3030
typedef void(^PFImageViewImageResultBlock)(UIImage *__nullable image, NSError *__nullable error);
3131

32-
@class BFTask PF_GENERIC(__covariant BFGenericType);
32+
@class BFTask<__covariant BFGenericType>;
3333
@class PFFile;
3434

3535
/**
@@ -51,7 +51,7 @@ typedef void(^PFImageViewImageResultBlock)(UIImage *__nullable image, NSError *
5151
5252
@return The task, that encapsulates the work being done.
5353
*/
54-
- (BFTask PF_GENERIC(UIImage *)*)loadInBackground;
54+
- (BFTask<UIImage *> *)loadInBackground;
5555

5656
/**
5757
Initiate downloading of the remote image.

ParseUI/Classes/Views/PFImageView.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ - (void)setFile:(PFFile *)otherFile {
4747
#pragma mark -
4848
#pragma mark Load
4949

50-
- (BFTask PF_GENERIC(UIImage *)*)loadInBackground {
51-
BFTaskCompletionSource PF_GENERIC(UIImage *)*source = [BFTaskCompletionSource taskCompletionSource];
50+
- (BFTask<UIImage *> *)loadInBackground {
51+
BFTaskCompletionSource<UIImage *> *source = [BFTaskCompletionSource taskCompletionSource];
5252
[self loadInBackground:^(UIImage *image, NSError *error) {
5353
if (error) {
5454
[source trySetError:error];

0 commit comments

Comments
 (0)