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

Commit

Permalink
Add nullability annotations to PFImageView, PFTextField.
Browse files Browse the repository at this point in the history
  • Loading branch information
nlutsenko committed Mar 2, 2015
1 parent 8725b94 commit 31dd778
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 10 additions & 3 deletions ParseUI/Classes/Views/PFImageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

#import <UIKit/UIKit.h>

#import <ParseUI/ParseUIConstants.h>

PFUI_ASSUME_NONNULL_BEGIN

@class BFTask;
@class PFFile;

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

/*!
@abstract Initiate downloading of the remote image.
Expand All @@ -52,7 +56,7 @@
@param completion the completion block.
*/
- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion;
- (void)loadInBackground:(PFUI_NULLABLE void (^)(PFUI_NULLABLE_S UIImage *image, PFUI_NULLABLE_S NSError *error))completion;

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

@end

PFUI_ASSUME_NONNULL_END
8 changes: 7 additions & 1 deletion ParseUI/Classes/Views/PFTextField.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

#import <UIKit/UIKit.h>

#import <ParseUI/ParseUIConstants.h>

PFUI_ASSUME_NONNULL_BEGIN

/*!
`PFTextFieldSeparatorStyle` bitmask specifies the style of the separators,
that should be used for a given `PFTextField`.
Expand Down Expand Up @@ -56,7 +60,7 @@ typedef NS_OPTIONS(uint8_t, PFTextFieldSeparatorStyle){
@discussion Default: `227,227,227,1.0`.
*/
@property (nonatomic, strong) UIColor *separatorColor UI_APPEARANCE_SELECTOR;
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong) UIColor *separatorColor UI_APPEARANCE_SELECTOR;

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

@end

PFUI_ASSUME_NONNULL_END

0 comments on commit 31dd778

Please sign in to comment.