diff --git a/SSPullToRefresh/SSPullToRefreshDefaultContentView.h b/SSPullToRefresh/SSPullToRefreshDefaultContentView.h index 13c1894..c5dede9 100644 --- a/SSPullToRefresh/SSPullToRefreshDefaultContentView.h +++ b/SSPullToRefresh/SSPullToRefreshDefaultContentView.h @@ -8,6 +8,8 @@ #import "SSPullToRefreshView.h" +NS_ASSUME_NONNULL_BEGIN + @interface SSPullToRefreshDefaultContentView : UIView @property (nonatomic, readonly) UILabel *statusLabel; @@ -15,3 +17,5 @@ @property (nonatomic, readonly) UIActivityIndicatorView *activityIndicatorView; @end + +NS_ASSUME_NONNULL_END diff --git a/SSPullToRefresh/SSPullToRefreshSimpleContentView.h b/SSPullToRefresh/SSPullToRefreshSimpleContentView.h index e0e8924..085eade 100644 --- a/SSPullToRefresh/SSPullToRefreshSimpleContentView.h +++ b/SSPullToRefresh/SSPullToRefreshSimpleContentView.h @@ -8,9 +8,13 @@ #import "SSPullToRefreshView.h" +NS_ASSUME_NONNULL_BEGIN + @interface SSPullToRefreshSimpleContentView : UIView @property (nonatomic, readonly) UILabel *statusLabel; @property (nonatomic, readonly) UIActivityIndicatorView *activityIndicatorView; @end + +NS_ASSUME_NONNULL_END diff --git a/SSPullToRefresh/SSPullToRefreshView.h b/SSPullToRefresh/SSPullToRefreshView.h index e874cdd..b5110e2 100644 --- a/SSPullToRefresh/SSPullToRefreshView.h +++ b/SSPullToRefresh/SSPullToRefreshView.h @@ -66,6 +66,8 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) { @protocol SSPullToRefreshViewDelegate; @protocol SSPullToRefreshContentView; +NS_ASSUME_NONNULL_BEGIN + @interface SSPullToRefreshView : UIView /** @@ -105,7 +107,7 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) { @see initWithScrollView:delegate: */ -@property (nonatomic, assign, readonly) UIScrollView *scrollView; +@property (nonatomic, weak, readonly, nullable) UIScrollView *scrollView; /** The delegate is sent messages when the pull to refresh view starts loading. This is automatically set with `initWithScrollView:delegate:`. @@ -113,7 +115,7 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) { @see initWithScrollView:delegate: @see SSPullToRefreshViewDelegate */ -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; /** The state of the pull to refresh view. @@ -156,13 +158,13 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) { animate down the pull to refresh view to show that it's loading. */ - (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated; -- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated completion:(void(^)())block; +- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated completion:(nullable void(^)(void))block; /** Call this when you finish loading. */ - (void)finishLoading; -- (void)finishLoadingAnimated:(BOOL)animated completion:(void(^)())block; +- (void)finishLoadingAnimated:(BOOL)animated completion:(nullable void(^)(void))block; /** Manually update the last updated at time. This will automatically get called when the pull to refresh view finishes laoding. @@ -240,3 +242,5 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) { - (void)setLastUpdatedAt:(NSDate *)date withPullToRefreshView:(SSPullToRefreshView *)view; @end + +NS_ASSUME_NONNULL_END diff --git a/SSPullToRefresh/SSPullToRefreshView.m b/SSPullToRefresh/SSPullToRefreshView.m index dd35173..c8b9318 100644 --- a/SSPullToRefresh/SSPullToRefreshView.m +++ b/SSPullToRefresh/SSPullToRefreshView.m @@ -194,7 +194,7 @@ - (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated { [self startLoadingAndExpand:shouldExpand animated:animated completion:nil]; } -- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated completion:(void(^)())block { +- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated completion:(void(^)(void))block { // If we're not loading, this method has no effect if (self.state == SSPullToRefreshViewStateLoading) { return; @@ -209,7 +209,7 @@ - (void)finishLoading { [self finishLoadingAnimated:YES completion:nil]; } -- (void)finishLoadingAnimated:(BOOL)animated completion:(void(^)())block { +- (void)finishLoadingAnimated:(BOOL)animated completion:(void(^)(void))block { // If we're not loading, this method has no effect if (self.state != SSPullToRefreshViewStateLoading) { return;