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

Replace nullability macros with generic annotations. #194

Merged
merged 1 commit into from
Nov 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ParseUI/Classes/Cells/PFCollectionViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#import <ParseUI/ParseUIConstants.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

@class PFImageView;
@class PFObject;
Expand Down Expand Up @@ -54,8 +54,8 @@ PFUI_ASSUME_NONNULL_BEGIN

@param object An instance of `PFObject` to update from.
*/
- (void)updateFromObject:(PFUI_NULLABLE PFObject *)object;
- (void)updateFromObject:(nullable PFObject *)object;

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
8 changes: 4 additions & 4 deletions ParseUI/Classes/Cells/PFPurchaseTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#import <ParseUI/ParseUIConstants.h>
#import <ParseUI/PFTableViewCell.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

/*!
An enum that represents states of the PFPurchaseTableViewCell.
Expand Down Expand Up @@ -56,13 +56,13 @@ typedef NS_ENUM(uint8_t, PFPurchaseTableViewCellState) {
/*!
@abstract Label where price of the product is displayed.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UILabel *priceLabel;
@property (nullable, nonatomic, strong, readonly) UILabel *priceLabel;

/*!
@abstract Progress view that is shown, when the product is downloading.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIProgressView *progressView;
@property (nullable, nonatomic, strong, readonly) UIProgressView *progressView;

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
6 changes: 3 additions & 3 deletions ParseUI/Classes/Cells/PFTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#import <ParseUI/ParseUIConstants.h>
#import <ParseUI/PFImageView.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

/*!
The `PFTableViewCell` class represents a table view cell which can download and display remote images stored on Parse.
Expand All @@ -39,8 +39,8 @@ PFUI_ASSUME_NONNULL_BEGIN

@see PFImageView
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) PFImageView *imageView;
@property (nullable, nonatomic, strong, readonly) PFImageView *imageView;

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
28 changes: 14 additions & 14 deletions ParseUI/Classes/LogInViewController/PFLogInView.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#import <ParseUI/ParseUIConstants.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

/*!
`PFLogInFields` bitmask specifies the log in elements which are enabled in the view.
Expand Down Expand Up @@ -84,14 +84,14 @@ typedef NS_OPTIONS(NSInteger, PFLogInFields) {

@discussion Used to lay out elements correctly when the presenting view controller has translucent elements.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, weak) UIViewController *presentingViewController;
@property (nullable, nonatomic, weak) UIViewController *presentingViewController;

///--------------------------------------
/// @name Customizing the Logo
///--------------------------------------

/// The logo. By default, it is the Parse logo.
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong) UIView *logo;
@property (nullable, nonatomic, strong) UIView *logo;

///--------------------------------------
/// @name Configure Username Behaviour
Expand All @@ -116,57 +116,57 @@ typedef NS_OPTIONS(NSInteger, PFLogInFields) {
/*!
@abstract The username text field. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) PFTextField *usernameField;
@property (nullable, nonatomic, strong, readonly) PFTextField *usernameField;

/*!
@abstract The password text field. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) PFTextField *passwordField;
@property (nullable, nonatomic, strong, readonly) PFTextField *passwordField;

/*!
@abstract The password forgotten button. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIButton *passwordForgottenButton;
@property (nullable, nonatomic, strong, readonly) UIButton *passwordForgottenButton;

/*!
@abstract The log in button. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIButton *logInButton;
@property (nullable, nonatomic, strong, readonly) UIButton *logInButton;

/*!
@abstract The Facebook button. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIButton *facebookButton;
@property (nullable, nonatomic, strong, readonly) UIButton *facebookButton;

/*!
@abstract The Twitter button. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIButton *twitterButton;
@property (nullable, nonatomic, strong, readonly) UIButton *twitterButton;

/*!
@abstract The sign up button. It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIButton *signUpButton;
@property (nullable, nonatomic, strong, readonly) UIButton *signUpButton;

/*!
@abstract It is `nil` if the element is not enabled.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UIButton *dismissButton;
@property (nullable, nonatomic, strong, readonly) UIButton *dismissButton;

/*!
@abstract The facebook/twitter login label.

@deprecated This property is deprecated and will always be nil.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UILabel *externalLogInLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."));
@property (nullable, nonatomic, strong, readonly) UILabel *externalLogInLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."));

/*!
@abstract The sign up label.

@deprecated This property is deprecated and will always be nil.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) UILabel *signUpLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."));
@property (nullable, nonatomic, strong, readonly) UILabel *signUpLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."));

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
14 changes: 7 additions & 7 deletions ParseUI/Classes/LogInViewController/PFLogInViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#import <ParseUI/ParseUIConstants.h>
#import <ParseUI/PFLogInView.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

@class PFSignUpViewController;
@class PFUser;
Expand Down Expand Up @@ -52,7 +52,7 @@ PFUI_ASSUME_NONNULL_BEGIN

@see PFLogInView
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong, readonly) PFLogInView *logInView;
@property (nullable, nonatomic, strong, readonly) PFLogInView *logInView;

///--------------------------------------
/// @name Configuring Log In Behaviors
Expand All @@ -63,22 +63,22 @@ PFUI_ASSUME_NONNULL_BEGIN

@see PFLogInViewControllerDelegate
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, weak) id<PFLogInViewControllerDelegate> delegate;
@property (nullable, nonatomic, weak) id<PFLogInViewControllerDelegate> delegate;

/*!
@abstract The facebook permissions that Facebook log in requests for.

@discussion If unspecified, the default is basic facebook permissions.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) NSArray *facebookPermissions;
@property (nullable, nonatomic, copy) NSArray *facebookPermissions;

/*!
@abstract The sign up controller if sign up is enabled.

@discussion Use this to configure the sign up view, and the transition animation to the sign up view.
The default is a sign up view with a username, a password, a dismiss button and a sign up button.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, strong) PFSignUpViewController *signUpController;
@property (nullable, nonatomic, strong) PFSignUpViewController *signUpController;

/*!
@abstract Whether to prompt for the email as username on the login view.
Expand Down Expand Up @@ -162,7 +162,7 @@ shouldBeginLogInWithUsername:(NSString *)username
@param error `NSError` object representing the error that occured.
*/
- (void)logInViewController:(PFLogInViewController *)logInController
didFailToLogInWithError:(PFUI_NULLABLE NSError *)error;
didFailToLogInWithError:(nullable NSError *)error;

/*!
@abstract Sent to the delegate when the log in screen is cancelled.
Expand All @@ -173,4 +173,4 @@ shouldBeginLogInWithUsername:(NSString *)username

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#import <ParseUI/ParseUIConstants.h>
#import <ParseUI/PFQueryTableViewController.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

/*!
`PFProductTableViewController` displays in-app purchase products stored on Parse.
Expand All @@ -44,4 +44,4 @@ PFUI_ASSUME_NONNULL_BEGIN

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#import <ParseUI/ParseUIConstants.h>

PFUI_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN

@class BFTask;
@class PFCollectionViewCell;
Expand All @@ -50,7 +50,7 @@ PFUI_ASSUME_NONNULL_BEGIN
/*!
@abstract The class name of the <PFObject> this collection will use as a datasource.
*/
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) IBInspectable NSString *parseClassName;
@property (nullable, nonatomic, copy) IBInspectable NSString *parseClassName;

/*!
@abstract Whether the collection should use the default loading view. Default - `YES`.
Expand Down Expand Up @@ -89,7 +89,7 @@ PFUI_ASSUME_NONNULL_BEGIN

@returns An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created.
*/
- (instancetype)initWithClassName:(PFUI_NULLABLE NSString *)className;
- (instancetype)initWithClassName:(nullable NSString *)className;

/*!
@abstract Initializes a view controller with a class name of <PFObject> that will be associated with this collection.
Expand All @@ -100,7 +100,7 @@ PFUI_ASSUME_NONNULL_BEGIN
@returns An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created.
*/
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout
className:(PFUI_NULLABLE NSString *)className NS_DESIGNATED_INITIALIZER;
className:(nullable NSString *)className NS_DESIGNATED_INITIALIZER;

///--------------------------------------
/// @name Responding to Events
Expand All @@ -117,7 +117,7 @@ PFUI_ASSUME_NONNULL_BEGIN
call [super objectsDidLoad:] in your implementation.
@param error The Parse error from running the PFQuery, if there was any.
*/
- (void)objectsDidLoad:(PFUI_NULLABLE NSError *)error NS_REQUIRES_SUPER;
- (void)objectsDidLoad:(nullable NSError *)error NS_REQUIRES_SUPER;

///--------------------------------------
/// @name Accessing Results
Expand All @@ -138,17 +138,17 @@ PFUI_ASSUME_NONNULL_BEGIN

@returns The object at the specified indexPath.
*/
- (PFUI_NULLABLE PFObject *)objectAtIndexPath:(PFUI_NULLABLE NSIndexPath *)indexPath;
- (nullable PFObject *)objectAtIndexPath:(nullable NSIndexPath *)indexPath;

/*!
@abstract Removes an object at the specified index path, animated.
*/
- (void)removeObjectAtIndexPath:(PFUI_NULLABLE NSIndexPath *)indexPath;
- (void)removeObjectAtIndexPath:(nullable NSIndexPath *)indexPath;

/*!
@abstract Removes all objects at the specified index paths, animated.
*/
- (void)removeObjectsAtIndexPaths:(PFUI_NULLABLE NSArray *)indexes;
- (void)removeObjectsAtIndexPaths:(nullable NSArray *)indexes;

///--------------------------------------
/// @name Loading Data
Expand Down Expand Up @@ -208,9 +208,9 @@ PFUI_ASSUME_NONNULL_BEGIN

@returns The cell that represents this object.
*/
- (PFUI_NULLABLE PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView
- (nullable PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath
object:(PFUI_NULLABLE PFObject *)object;
object:(nullable PFObject *)object;

/*!
@discussion Override this method to customize the view that allows the user to load the
Expand All @@ -220,8 +220,8 @@ PFUI_ASSUME_NONNULL_BEGIN

@returns The view that allows the user to paginate.
*/
- (PFUI_NULLABLE UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView;
- (nullable UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView;

@end

PFUI_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
Loading