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

Commit 31dd778

Browse files
committed
Add nullability annotations to PFImageView, PFTextField.
1 parent 8725b94 commit 31dd778

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

ParseUI/Classes/Views/PFImageView.h

Lines changed: 10 additions & 3 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 BFTask;
2529
@class PFFile;
2630

@@ -34,7 +38,7 @@
3438
3539
@warning Note that the download does not start until <loadInBackground:> is called.
3640
*/
37-
@property (nonatomic, strong) PFFile *file;
41+
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong) PFFile *file;
3842

3943
/*!
4044
@abstract Initiate downloading of the remote image.
@@ -52,7 +56,7 @@
5256
5357
@param completion the completion block.
5458
*/
55-
- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion;
59+
- (void)loadInBackground:(PFUI_NULLABLE void (^)(PFUI_NULLABLE_S UIImage *image, PFUI_NULLABLE_S NSError *error))completion;
5660

5761
/*!
5862
@abstract Initiate downloading of the remote image.
@@ -63,6 +67,9 @@
6367
@param progressBlock called with the download progress as the image is being downloaded.
6468
Will be called with a value of 100 before the completion block is called.
6569
*/
66-
- (void)loadInBackground:(void (^)(UIImage *, NSError *))completion progressBlock:(void (^)(int percentDone))progressBlock;
70+
- (void)loadInBackground:(PFUI_NULLABLE void (^)(PFUI_NULLABLE_S UIImage *image, PFUI_NULLABLE_S NSError *error))completion
71+
progressBlock:(PFUI_NULLABLE void (^)(int percentDone))progressBlock;
6772

6873
@end
74+
75+
PFUI_ASSUME_NONNULL_END

ParseUI/Classes/Views/PFTextField.h

Lines changed: 7 additions & 1 deletion
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
/*!
2529
`PFTextFieldSeparatorStyle` bitmask specifies the style of the separators,
2630
that should be used for a given `PFTextField`.
@@ -56,7 +60,7 @@ typedef NS_OPTIONS(uint8_t, PFTextFieldSeparatorStyle){
5660
5761
@discussion Default: `227,227,227,1.0`.
5862
*/
59-
@property (nonatomic, strong) UIColor *separatorColor UI_APPEARANCE_SELECTOR;
63+
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong) UIColor *separatorColor UI_APPEARANCE_SELECTOR;
6064

6165
/*!
6266
This method is a convenience initializer that sets both `frame` and `separatorStyle` for an instance of `PFTextField.`
@@ -69,3 +73,5 @@ typedef NS_OPTIONS(uint8_t, PFTextFieldSeparatorStyle){
6973
- (instancetype)initWithFrame:(CGRect)frame separatorStyle:(PFTextFieldSeparatorStyle)separatorStyle;
7074

7175
@end
76+
77+
PFUI_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)