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 PFQueryCollectionViewController.
Browse files Browse the repository at this point in the history
  • Loading branch information
nlutsenko committed Mar 2, 2015
1 parent efe64e1 commit 4d270a7
Showing 1 changed file with 16 additions and 9 deletions.
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 PFCollectionViewCell;
@class PFObject;
@class PFQuery;
Expand All @@ -45,7 +49,7 @@
/*!
@abstract The class name of the <PFObject> this collection will use as a datasource.
*/
@property (nonatomic, copy) IBInspectable NSString *parseClassName;
@property (PFUI_NULLABLE_PROPERTY nonatomic, copy) IBInspectable NSString *parseClassName;

/*!
@abstract Whether the collection should use the default loading view. Default - `YES`.
Expand Down Expand Up @@ -84,7 +88,7 @@
@returns An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created.
*/
- (instancetype)initWithClassName:(NSString *)className;
- (instancetype)initWithClassName:(PFUI_NULLABLE NSString *)className;

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

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

///--------------------------------------
/// @name Accessing Results
Expand All @@ -132,7 +137,7 @@
@returns The object at the specified indexPath.
*/
- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath;
- (PFUI_NULLABLE PFObject *)objectAtIndexPath:(PFUI_NULLABLE NSIndexPath *)indexPath;

///--------------------------------------
/// @name Loading Data
Expand Down Expand Up @@ -188,9 +193,9 @@
@returns The cell that represents this object.
*/
- (PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath
object:(PFObject *)object;
- (PFUI_NULLABLE PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath
object:(PFUI_NULLABLE PFObject *)object;

/*!
@discussion Override this method to customize the view that allows the user to load the
Expand All @@ -200,6 +205,8 @@
@returns The view that allows the user to paginate.
*/
- (UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView;
- (PFUI_NULLABLE UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView;

@end

PFUI_ASSUME_NONNULL_END

0 comments on commit 4d270a7

Please sign in to comment.