29
29
@interface RCTCustomScrollView : UIScrollView <UIGestureRecognizerDelegate>
30
30
31
31
@property (nonatomic , assign ) BOOL centerContent;
32
- @property (nonatomic , strong ) UIView<RCTCustomRefreshContolProtocol > *customRefreshControl;
32
+ @property (nonatomic , strong ) UIView<RCTCustomRefreshControlProtocol > *customRefreshControl;
33
33
@property (nonatomic , assign ) BOOL pinchGestureEnabled;
34
34
35
35
@end
@@ -215,14 +215,14 @@ - (void)setFrame:(CGRect)frame
215
215
}
216
216
}
217
217
218
- - (void )setCustomRefreshControl : (UIView<RCTCustomRefreshContolProtocol > *)refreshControl
218
+ - (void )setCustomRefreshControl : (UIView<RCTCustomRefreshControlProtocol > *)refreshControl
219
219
{
220
220
if (_customRefreshControl) {
221
221
[_customRefreshControl removeFromSuperview ];
222
222
}
223
223
_customRefreshControl = refreshControl;
224
224
// We have to set this because we can't always guarantee the
225
- // `RCTCustomRefreshContolProtocol `'s superview will always be of class
225
+ // `RCTCustomRefreshControlProtocol `'s superview will always be of class
226
226
// `UIScrollView` like we were previously
227
227
if ([_customRefreshControl respondsToSelector: @selector (setScrollView: )]) {
228
228
_customRefreshControl.scrollView = self;
@@ -412,8 +412,8 @@ - (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews
412
412
- (void )insertReactSubview : (UIView *)view atIndex : (NSInteger )atIndex
413
413
{
414
414
[super insertReactSubview: view atIndex: atIndex];
415
- if ([view conformsToProtocol: @protocol (RCTCustomRefreshContolProtocol )]) {
416
- [_scrollView setCustomRefreshControl: (UIView<RCTCustomRefreshContolProtocol > *)view];
415
+ if ([view conformsToProtocol: @protocol (RCTCustomRefreshControlProtocol )]) {
416
+ [_scrollView setCustomRefreshControl: (UIView<RCTCustomRefreshControlProtocol > *)view];
417
417
if (![view isKindOfClass: [UIRefreshControl class ]] && [view conformsToProtocol: @protocol (UIScrollViewDelegate)]) {
418
418
[self addScrollListener: (UIView<UIScrollViewDelegate> *)view];
419
419
}
@@ -431,7 +431,7 @@ - (void)insertReactSubview:(UIView *)view atIndex:(NSInteger)atIndex
431
431
- (void )removeReactSubview : (UIView *)subview
432
432
{
433
433
[super removeReactSubview: subview];
434
- if ([subview conformsToProtocol: @protocol (RCTCustomRefreshContolProtocol )]) {
434
+ if ([subview conformsToProtocol: @protocol (RCTCustomRefreshControlProtocol )]) {
435
435
[_scrollView setCustomRefreshControl: nil ];
436
436
if (![subview isKindOfClass: [UIRefreshControl class ]] &&
437
437
[subview conformsToProtocol: @protocol (UIScrollViewDelegate)]) {
@@ -486,7 +486,7 @@ - (void)layoutSubviews
486
486
487
487
#if !TARGET_OS_TV
488
488
// Adjust the refresh control frame if the scrollview layout changes.
489
- UIView<RCTCustomRefreshContolProtocol > *refreshControl = _scrollView.customRefreshControl ;
489
+ UIView<RCTCustomRefreshControlProtocol > *refreshControl = _scrollView.customRefreshControl ;
490
490
if (refreshControl && refreshControl.isRefreshing && ![refreshControl isKindOfClass: UIRefreshControl.class]) {
491
491
refreshControl.frame =
492
492
(CGRect){_scrollView.contentOffset , {_scrollView.frame .size .width , refreshControl.frame .size .height }};
0 commit comments