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

Commit efe64e1

Browse files
committed
Add nullability annotations to PFQueryTableViewController.
1 parent 9f02988 commit efe64e1

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

ParseUI/Classes/QueryTableViewController/PFQueryTableViewController.h

Lines changed: 21 additions & 13 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 PFObject;
2529
@class PFQuery;
2630
@class PFTableViewCell;
@@ -52,7 +56,8 @@
5256
5357
@returns An initialized `PFQueryTableViewController` object or `nil` if the object couldn't be created.
5458
*/
55-
- (instancetype)initWithStyle:(UITableViewStyle)style className:(NSString *)className NS_DESIGNATED_INITIALIZER;
59+
- (instancetype)initWithStyle:(UITableViewStyle)style
60+
className:(PFUI_NULLABLE NSString *)className NS_DESIGNATED_INITIALIZER;
5661

5762
/*!
5863
@abstract Initializes with a class name of the PFObjects that will be associated with this table.
@@ -61,7 +66,7 @@
6166
6267
@returns An initialized `PFQueryTableViewController` object or `nil` if the object couldn't be created.
6368
*/
64-
- (instancetype)initWithClassName:(NSString *)className;
69+
- (instancetype)initWithClassName:(PFUI_NULLABLE NSString *)className;
6570

6671
///--------------------------------------
6772
/// @name Configuring Behavior
@@ -70,28 +75,28 @@
7075
/*!
7176
@abstract The class name of the <PFObject> this table will use as a datasource.
7277
*/
73-
@property (nonatomic, copy) IBInspectable NSString *parseClassName;
78+
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) IBInspectable NSString *parseClassName;
7479

7580
/*!
7681
@abstract The key to use to display for the cell text label.
7782
7883
@discussion This won't apply if you override <tableView:cellForRowAtIndexPath:object:>
7984
*/
80-
@property (nonatomic, copy) IBInspectable NSString *textKey;
85+
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) IBInspectable NSString *textKey;
8186

8287
/*!
8388
@abstract The key to use to display for the cell image view.
8489
8590
@discussion This won't apply if you override <tableView:cellForRowAtIndexPath:object:>
8691
*/
87-
@property (nonatomic, copy) IBInspectable NSString *imageKey;
92+
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) IBInspectable NSString *imageKey;
8893

8994
/*!
9095
@abstract The image to use as a placeholder for the cell images.
9196
9297
@discussion This won't apply if you override <tableView:cellForRowAtIndexPath:object:>
9398
*/
94-
@property (nonatomic, strong) IBInspectable UIImage *placeholderImage;
99+
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong) IBInspectable UIImage *placeholderImage;
95100

96101
/*!
97102
@abstract Whether the table should use the default loading view. Default - `YES`.
@@ -133,7 +138,7 @@
133138
call [super objectsDidLoad:] in your implementation.
134139
@param error The Parse error from running the PFQuery, if there was any.
135140
*/
136-
- (void)objectsDidLoad:(NSError *)error;
141+
- (void)objectsDidLoad:(PFUI_NULLABLE NSError *)error;
137142

138143
///--------------------------------------
139144
/// @name Accessing Results
@@ -142,7 +147,7 @@
142147
/*!
143148
@abstract The array of instances of <PFObject> that is used as a data source.
144149
*/
145-
@property (nonatomic, copy, readonly) NSArray *objects;
150+
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy, readonly) NSArray *objects;
146151

147152
/*!
148153
@abstract Returns an object at a particular indexPath.
@@ -154,7 +159,7 @@
154159
155160
@returns The object at the specified index
156161
*/
157-
- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath;
162+
- (PFUI_NULLABLE PFObject *)objectAtIndexPath:(PFUI_NULLABLE NSIndexPath *)indexPath;
158163

159164
/*!
160165
@abstract Clears the table of all objects.
@@ -208,9 +213,9 @@
208213
209214
@returns The cell that represents this object.
210215
*/
211-
- (PFTableViewCell *)tableView:(UITableView *)tableView
212-
cellForRowAtIndexPath:(NSIndexPath *)indexPath
213-
object:(PFObject *)object;
216+
- (PFUI_NULLABLE PFTableViewCell *)tableView:(UITableView *)tableView
217+
cellForRowAtIndexPath:(NSIndexPath *)indexPath
218+
object:(PFUI_NULLABLE PFObject *)object;
214219

215220
/*!
216221
@discussion Override this method to customize the cell that allows the user to load the
@@ -221,6 +226,9 @@
221226
222227
@returns The cell that allows the user to paginate.
223228
*/
224-
- (PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath;
229+
- (PFUI_NULLABLE PFTableViewCell *)tableView:(UITableView *)tableView
230+
cellForNextPageAtIndexPath:(NSIndexPath *)indexPath;
225231

226232
@end
233+
234+
PFUI_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)