Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Commit d8ddd28

Browse files
committed
Add nullability annotations
1 parent 47a5271 commit d8ddd28

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

SSPullToRefresh/SSPullToRefreshDefaultContentView.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88

99
#import "SSPullToRefreshView.h"
1010

11+
NS_ASSUME_NONNULL_BEGIN
12+
1113
@interface SSPullToRefreshDefaultContentView : UIView <SSPullToRefreshContentView>
1214

1315
@property (nonatomic, readonly) UILabel *statusLabel;
1416
@property (nonatomic, readonly) UILabel *lastUpdatedAtLabel;
1517
@property (nonatomic, readonly) UIActivityIndicatorView *activityIndicatorView;
1618

1719
@end
20+
21+
NS_ASSUME_NONNULL_END

SSPullToRefresh/SSPullToRefreshSimpleContentView.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88

99
#import "SSPullToRefreshView.h"
1010

11+
NS_ASSUME_NONNULL_BEGIN
12+
1113
@interface SSPullToRefreshSimpleContentView : UIView <SSPullToRefreshContentView>
1214

1315
@property (nonatomic, readonly) UILabel *statusLabel;
1416
@property (nonatomic, readonly) UIActivityIndicatorView *activityIndicatorView;
1517

1618
@end
19+
20+
NS_ASSUME_NONNULL_END

SSPullToRefresh/SSPullToRefreshView.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) {
6666
@protocol SSPullToRefreshViewDelegate;
6767
@protocol SSPullToRefreshContentView;
6868

69+
NS_ASSUME_NONNULL_BEGIN
70+
6971
@interface SSPullToRefreshView : UIView
7072

7173
/**
@@ -105,15 +107,15 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) {
105107
106108
@see initWithScrollView:delegate:
107109
*/
108-
@property (nonatomic, assign, readonly) UIScrollView *scrollView;
110+
@property (nonatomic, weak, readonly, nullable) UIScrollView *scrollView;
109111

110112
/**
111113
The delegate is sent messages when the pull to refresh view starts loading. This is automatically set with `initWithScrollView:delegate:`.
112114
113115
@see initWithScrollView:delegate:
114116
@see SSPullToRefreshViewDelegate
115117
*/
116-
@property (nonatomic, weak) id<SSPullToRefreshViewDelegate> delegate;
118+
@property (nonatomic, weak, nullable) id<SSPullToRefreshViewDelegate> delegate;
117119

118120
/**
119121
The state of the pull to refresh view.
@@ -156,13 +158,13 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) {
156158
animate down the pull to refresh view to show that it's loading.
157159
*/
158160
- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated;
159-
- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated completion:(void(^)(void))block;
161+
- (void)startLoadingAndExpand:(BOOL)shouldExpand animated:(BOOL)animated completion:(nullable void(^)(void))block;
160162

161163
/**
162164
Call this when you finish loading.
163165
*/
164166
- (void)finishLoading;
165-
- (void)finishLoadingAnimated:(BOOL)animated completion:(void(^)(void))block;
167+
- (void)finishLoadingAnimated:(BOOL)animated completion:(nullable void(^)(void))block;
166168

167169
/**
168170
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) {
240242
- (void)setLastUpdatedAt:(NSDate *)date withPullToRefreshView:(SSPullToRefreshView *)view;
241243

242244
@end
245+
246+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)