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

Commit 4d270a7

Browse files
committed
Add nullability annotations to PFQueryCollectionViewController.
1 parent efe64e1 commit 4d270a7

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

ParseUI/Classes/QueryCollectionViewController/PFQueryCollectionViewController.h

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
#import <UIKit/UIKit.h>
2323

24+
#import <ParseUI/ParseUIConstants.h>
25+
26+
PFUI_ASSUME_NONNULL_BEGIN
27+
2428
@class PFCollectionViewCell;
2529
@class PFObject;
2630
@class PFQuery;
@@ -45,7 +49,7 @@
4549
/*!
4650
@abstract The class name of the <PFObject> this collection will use as a datasource.
4751
*/
48-
@property (nonatomic, copy) IBInspectable NSString *parseClassName;
52+
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) IBInspectable NSString *parseClassName;
4953

5054
/*!
5155
@abstract Whether the collection should use the default loading view. Default - `YES`.
@@ -84,7 +88,7 @@
8488
8589
@returns An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created.
8690
*/
87-
- (instancetype)initWithClassName:(NSString *)className;
91+
- (instancetype)initWithClassName:(PFUI_NULLABLE NSString *)className;
8892

8993
/*!
9094
@abstract Initializes a view controller with a class name of <PFObject> that will be associated with this collection.
@@ -94,7 +98,8 @@
9498
9599
@returns An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created.
96100
*/
97-
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout className:(NSString *)className NS_DESIGNATED_INITIALIZER;
101+
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout
102+
className:(PFUI_NULLABLE NSString *)className NS_DESIGNATED_INITIALIZER;
98103

99104
///--------------------------------------
100105
/// @name Responding to Events
@@ -111,7 +116,7 @@
111116
call [super objectsDidLoad:] in your implementation.
112117
@param error The Parse error from running the PFQuery, if there was any.
113118
*/
114-
- (void)objectsDidLoad:(NSError *)error NS_REQUIRES_SUPER;
119+
- (void)objectsDidLoad:(PFUI_NULLABLE NSError *)error NS_REQUIRES_SUPER;
115120

116121
///--------------------------------------
117122
/// @name Accessing Results
@@ -132,7 +137,7 @@
132137
133138
@returns The object at the specified indexPath.
134139
*/
135-
- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath;
140+
- (PFUI_NULLABLE PFObject *)objectAtIndexPath:(PFUI_NULLABLE NSIndexPath *)indexPath;
136141

137142
///--------------------------------------
138143
/// @name Loading Data
@@ -188,9 +193,9 @@
188193
189194
@returns The cell that represents this object.
190195
*/
191-
- (PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView
192-
cellForItemAtIndexPath:(NSIndexPath *)indexPath
193-
object:(PFObject *)object;
196+
- (PFUI_NULLABLE PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView
197+
cellForItemAtIndexPath:(NSIndexPath *)indexPath
198+
object:(PFUI_NULLABLE PFObject *)object;
194199

195200
/*!
196201
@discussion Override this method to customize the view that allows the user to load the
@@ -200,6 +205,8 @@
200205
201206
@returns The view that allows the user to paginate.
202207
*/
203-
- (UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView;
208+
- (PFUI_NULLABLE UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView;
204209

205210
@end
211+
212+
PFUI_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)