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

Commit 6fc1c09

Browse files
committed
Add nullability annotations to PFImageView, PFTextField.
1 parent afeaae7 commit 6fc1c09

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

ParseUI/Classes/Views/PFImageView.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#import <UIKit/UIKit.h>
2323

24+
#import <ParseUI/ParseUIConstants.h>
25+
2426
@class BFTask;
2527
@class PFFile;
2628

@@ -34,7 +36,7 @@
3436
3537
@warning Note that the download does not start until <loadInBackground:> is called.
3638
*/
37-
@property (nonatomic, strong) PFFile *file;
39+
@property (nonatomic, strong, nullable) PFFile *file;
3840

3941
/*!
4042
@abstract Initiate downloading of the remote image.
@@ -43,7 +45,7 @@
4345
4446
@returns The task, that encapsulates the work being done.
4547
*/
46-
- (BFTask *)loadInBackground;
48+
- (nonnull BFTask *)loadInBackground;
4749

4850
/*!
4951
@abstract Initiate downloading of the remote image.
@@ -52,7 +54,7 @@
5254
5355
@param completion the completion block.
5456
*/
55-
- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion;
57+
- (void)loadInBackground:(nullable void (^)(__nullable UIImage *image, __nullable NSError *error))completion;
5658

5759
/*!
5860
@abstract Initiate downloading of the remote image.
@@ -63,6 +65,7 @@
6365
@param progressBlock called with the download progress as the image is being downloaded.
6466
Will be called with a value of 100 before the completion block is called.
6567
*/
66-
- (void)loadInBackground:(void (^)(UIImage *, NSError *))completion progressBlock:(void (^)(int percentDone))progressBlock;
68+
- (void)loadInBackground:(nullable void (^)(__nullable UIImage *image, __nullable NSError *error))completion
69+
progressBlock:(nullable void (^)(int percentDone))progressBlock;
6770

6871
@end

ParseUI/Classes/Views/PFTextField.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#import <UIKit/UIKit.h>
2323

24+
#import <ParseUI/ParseUIConstants.h>
25+
2426
/*!
2527
`PFTextFieldSeparatorStyle` bitmask specifies the style of the separators,
2628
that should be used for a given `PFTextField`.
@@ -56,7 +58,7 @@ typedef NS_OPTIONS(uint8_t, PFTextFieldSeparatorStyle){
5658
5759
@discussion Default: `227,227,227,1.0`.
5860
*/
59-
@property (nonatomic, strong) UIColor *separatorColor UI_APPEARANCE_SELECTOR;
61+
@property (nonatomic, strong, nullable) UIColor *separatorColor UI_APPEARANCE_SELECTOR;
6062

6163
/*!
6264
This method is a convenience initializer that sets both `frame` and `separatorStyle` for an instance of `PFTextField.`
@@ -66,6 +68,6 @@ typedef NS_OPTIONS(uint8_t, PFTextFieldSeparatorStyle){
6668
6769
@return An initialized instance of `PFTextField` or `nil` if it couldn't be created.
6870
*/
69-
- (instancetype)initWithFrame:(CGRect)frame separatorStyle:(PFTextFieldSeparatorStyle)separatorStyle;
71+
- (nonnull instancetype)initWithFrame:(CGRect)frame separatorStyle:(PFTextFieldSeparatorStyle)separatorStyle;
7072

7173
@end

0 commit comments

Comments
 (0)