From a33b671df9008f8a9fab33d5772ed7ba580b48c6 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 6 Jan 2016 18:15:06 -0800 Subject: [PATCH] Remove all usages of PF_GENERIC macro. --- .../LogInViewController/PFLogInViewController.h | 2 +- .../PFQueryCollectionViewController.h | 10 +++++----- .../PFQueryCollectionViewController.m | 8 ++++---- .../PFQueryTableViewController.h | 12 ++++++------ .../PFQueryTableViewController.m | 10 +++++----- .../SignUpViewController/PFSignUpViewController.h | 2 +- ParseUI/Classes/Views/PFImageView.h | 4 ++-- ParseUI/Classes/Views/PFImageView.m | 4 ++-- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ParseUI/Classes/LogInViewController/PFLogInViewController.h b/ParseUI/Classes/LogInViewController/PFLogInViewController.h index 0c63fcb..72d4ff3 100644 --- a/ParseUI/Classes/LogInViewController/PFLogInViewController.h +++ b/ParseUI/Classes/LogInViewController/PFLogInViewController.h @@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN If unspecified, the default is basic facebook permissions. */ -@property (nullable, nonatomic, copy) NSArray PF_GENERIC(NSString *)*facebookPermissions; +@property (nullable, nonatomic, copy) NSArray *facebookPermissions; /** The sign up controller if sign up is enabled. diff --git a/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.h b/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.h index 1c0b73a..a09589c 100644 --- a/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.h +++ b/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.h @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN -@class BFTask PF_GENERIC(__covariant BFGenericType); +@class BFTask<__covariant BFGenericType>; @class PFCollectionViewCell; @class PFObject; @class PFQuery; @@ -127,7 +127,7 @@ NS_ASSUME_NONNULL_BEGIN /** The array of instances of `PFObject` that is used as a data source. */ -@property (nonatomic, copy, readonly) NSArray PF_GENERIC(__kindof PFObject *)*objects; +@property (nonatomic, copy, readonly) NSArray<__kindof PFObject *> *objects; /** Returns an object at a particular indexPath. @@ -149,7 +149,7 @@ NS_ASSUME_NONNULL_BEGIN /** Removes all objects at the specified index paths, animated. */ -- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexes; +- (void)removeObjectsAtIndexPaths:(nullable NSArray *)indexes; ///-------------------------------------- /// @name Loading Data @@ -160,7 +160,7 @@ NS_ASSUME_NONNULL_BEGIN @return An awaitable task that completes when the reload succeeds */ -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects; +- (BFTask *> *)loadObjects; /** Loads the objects of the `PFObject.parseClassName` at the specified page and appends it to the @@ -171,7 +171,7 @@ NS_ASSUME_NONNULL_BEGIN @return An awaitable task that completes when the reload succeeds */ -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear; +- (BFTask *> *)loadObjects:(NSInteger)page clear:(BOOL)clear; /** Loads the next page of objects, appends to table, and refreshes. diff --git a/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m b/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m index 41a9c23..9716289 100644 --- a/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m +++ b/ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.m @@ -36,7 +36,7 @@ static NSString *const PFQueryCollectionViewNextPageReusableViewIdentifier = @"nextPageView"; @interface PFQueryCollectionViewController () { - NSMutableArray PF_GENERIC(PFObject *)*_mutableObjects; + NSMutableArray *_mutableObjects; BOOL _firstLoad; // Whether we have loaded the first set of objects NSInteger _currentPage; // The last page that was loaded @@ -226,18 +226,18 @@ - (void)removeObjectsAtIndexPaths:(NSArray *)indexPaths { #pragma mark - #pragma mark Loading Data -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects { +- (BFTask *> *)loadObjects { return [self loadObjects:0 clear:YES]; } -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear { +- (BFTask *> *)loadObjects:(NSInteger)page clear:(BOOL)clear { self.loading = YES; [self objectsWillLoad]; PFQuery *query = [self queryForCollection]; [self _alterQuery:query forLoadingPage:page]; - BFTaskCompletionSource PF_GENERIC(NSArray<__kindof PFObject *>*)*source = [BFTaskCompletionSource taskCompletionSource]; + BFTaskCompletionSource *> *source = [BFTaskCompletionSource taskCompletionSource]; [query findObjectsInBackgroundWithBlock:^(NSArray *foundObjects, NSError *error) { if (![Parse isLocalDatastoreEnabled] && query.cachePolicy != kPFCachePolicyCacheOnly && diff --git a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.h b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.h index 917b102..62d4a01 100644 --- a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.h +++ b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.h @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN -@class BFTask PF_GENERIC(__covariant BFGenericType); +@class BFTask<__covariant BFGenericType>; @class PFObject; @class PFQuery; @class PFTableViewCell; @@ -149,7 +149,7 @@ NS_ASSUME_NONNULL_BEGIN /** The array of instances of `PFObject` that is used as a data source. */ -@property (nullable, nonatomic, copy, readonly) NSArray PF_GENERIC(__kindof PFObject *)*objects; +@property (nullable, nonatomic, copy, readonly) NSArray<__kindof PFObject *> *objects; /** Returns an object at a particular indexPath. @@ -176,12 +176,12 @@ NS_ASSUME_NONNULL_BEGIN /** Removes all objects at the specified index paths, animated. */ -- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexPaths; +- (void)removeObjectsAtIndexPaths:(nullable NSArray *)indexPaths; /** Removes all objects at the specified index paths, with or without animation. */ -- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexPaths animated:(BOOL)animated; +- (void)removeObjectsAtIndexPaths:(nullable NSArray *)indexPaths animated:(BOOL)animated; /** Clears the table of all objects. @@ -193,7 +193,7 @@ NS_ASSUME_NONNULL_BEGIN @return An awaitable task that completes when the reload succeeds */ -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)loadObjects; +- (BFTask *> *)loadObjects; /** Loads the objects of the className at the specified page and appends it to the @@ -204,7 +204,7 @@ NS_ASSUME_NONNULL_BEGIN @return An awaitable task that completes when the reload succeeds */ -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)loadObjects:(NSInteger)page clear:(BOOL)clear; +- (BFTask *> *)loadObjects:(NSInteger)page clear:(BOOL)clear; /** Loads the next page of objects, appends to table, and refreshes. diff --git a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m index a64cf9a..e5bbf46 100644 --- a/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m +++ b/ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.m @@ -45,7 +45,7 @@ - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibB @end @interface PFQueryTableViewController () { - NSMutableArray PF_GENERIC(PFObject *)*_mutableObjects; + NSMutableArray *_mutableObjects; BOOL _firstLoad; // Whether we have loaded the first set of objects NSInteger _currentPage; // The last page that was loaded @@ -212,18 +212,18 @@ - (void)clear { _currentPage = 0; } -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects { +- (BFTask *> *)loadObjects { return [self loadObjects:0 clear:YES]; } -- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear { +- (BFTask *> *)loadObjects:(NSInteger)page clear:(BOOL)clear { self.loading = YES; [self objectsWillLoad]; PFQuery *query = [self queryForTable]; [self _alterQuery:query forLoadingPage:page]; - BFTaskCompletionSource PF_GENERIC(NSArray<__kindof PFObject *>*)*source = [BFTaskCompletionSource taskCompletionSource]; + BFTaskCompletionSource *> *source = [BFTaskCompletionSource taskCompletionSource]; [query findObjectsInBackgroundWithBlock:^(NSArray *foundObjects, NSError *error) { if (![Parse isLocalDatastoreEnabled] && query.cachePolicy != kPFCachePolicyCacheOnly && @@ -558,7 +558,7 @@ - (void)_refreshControlValueChanged:(UIRefreshControl *)refreshControl { #pragma mark - #pragma mark Accessors -- (NSArray PF_GENERIC(__kindof PFObject *)*)objects { +- (NSArray<__kindof PFObject *> *)objects { return _mutableObjects; } diff --git a/ParseUI/Classes/SignUpViewController/PFSignUpViewController.h b/ParseUI/Classes/SignUpViewController/PFSignUpViewController.h index e9baf62..23c7779 100644 --- a/ParseUI/Classes/SignUpViewController/PFSignUpViewController.h +++ b/ParseUI/Classes/SignUpViewController/PFSignUpViewController.h @@ -127,7 +127,7 @@ extern NSString *const PFSignUpCancelNotification; @return A `BOOL` indicating whether the sign up should proceed. */ -- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary PF_GENERIC(NSString *,NSString *)*)info; +- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info; ///-------------------------------------- /// @name Responding to Actions diff --git a/ParseUI/Classes/Views/PFImageView.h b/ParseUI/Classes/Views/PFImageView.h index adabf56..d8d4845 100644 --- a/ParseUI/Classes/Views/PFImageView.h +++ b/ParseUI/Classes/Views/PFImageView.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN typedef void(^PFImageViewImageResultBlock)(UIImage *__nullable image, NSError *__nullable error); -@class BFTask PF_GENERIC(__covariant BFGenericType); +@class BFTask<__covariant BFGenericType>; @class PFFile; /** @@ -51,7 +51,7 @@ typedef void(^PFImageViewImageResultBlock)(UIImage *__nullable image, NSError * @return The task, that encapsulates the work being done. */ -- (BFTask PF_GENERIC(UIImage *)*)loadInBackground; +- (BFTask *)loadInBackground; /** Initiate downloading of the remote image. diff --git a/ParseUI/Classes/Views/PFImageView.m b/ParseUI/Classes/Views/PFImageView.m index ea8d2eb..f10a9aa 100644 --- a/ParseUI/Classes/Views/PFImageView.m +++ b/ParseUI/Classes/Views/PFImageView.m @@ -47,8 +47,8 @@ - (void)setFile:(PFFile *)otherFile { #pragma mark - #pragma mark Load -- (BFTask PF_GENERIC(UIImage *)*)loadInBackground { - BFTaskCompletionSource PF_GENERIC(UIImage *)*source = [BFTaskCompletionSource taskCompletionSource]; +- (BFTask *)loadInBackground { + BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource]; [self loadInBackground:^(UIImage *image, NSError *error) { if (error) { [source trySetError:error];