2929@interface RCTCustomScrollView : UIScrollView <UIGestureRecognizerDelegate>
3030
3131@property (nonatomic , assign ) BOOL centerContent;
32- @property (nonatomic , strong ) UIView<RCTCustomRefreshContolProtocol > *customRefreshControl;
32+ @property (nonatomic , strong ) UIView<RCTCustomRefreshControlProtocol > *customRefreshControl;
3333@property (nonatomic , assign ) BOOL pinchGestureEnabled;
3434
3535@end
@@ -215,14 +215,14 @@ - (void)setFrame:(CGRect)frame
215215 }
216216}
217217
218- - (void )setCustomRefreshControl : (UIView<RCTCustomRefreshContolProtocol > *)refreshControl
218+ - (void )setCustomRefreshControl : (UIView<RCTCustomRefreshControlProtocol > *)refreshControl
219219{
220220 if (_customRefreshControl) {
221221 [_customRefreshControl removeFromSuperview ];
222222 }
223223 _customRefreshControl = refreshControl;
224224 // 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
226226 // `UIScrollView` like we were previously
227227 if ([_customRefreshControl respondsToSelector: @selector (setScrollView: )]) {
228228 _customRefreshControl.scrollView = self;
@@ -412,8 +412,8 @@ - (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews
412412- (void )insertReactSubview : (UIView *)view atIndex : (NSInteger )atIndex
413413{
414414 [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];
417417 if (![view isKindOfClass: [UIRefreshControl class ]] && [view conformsToProtocol: @protocol (UIScrollViewDelegate)]) {
418418 [self addScrollListener: (UIView<UIScrollViewDelegate> *)view];
419419 }
@@ -431,7 +431,7 @@ - (void)insertReactSubview:(UIView *)view atIndex:(NSInteger)atIndex
431431- (void )removeReactSubview : (UIView *)subview
432432{
433433 [super removeReactSubview: subview];
434- if ([subview conformsToProtocol: @protocol (RCTCustomRefreshContolProtocol )]) {
434+ if ([subview conformsToProtocol: @protocol (RCTCustomRefreshControlProtocol )]) {
435435 [_scrollView setCustomRefreshControl: nil ];
436436 if (![subview isKindOfClass: [UIRefreshControl class ]] &&
437437 [subview conformsToProtocol: @protocol (UIScrollViewDelegate)]) {
@@ -486,7 +486,7 @@ - (void)layoutSubviews
486486
487487#if !TARGET_OS_TV
488488 // Adjust the refresh control frame if the scrollview layout changes.
489- UIView<RCTCustomRefreshContolProtocol > *refreshControl = _scrollView.customRefreshControl ;
489+ UIView<RCTCustomRefreshControlProtocol > *refreshControl = _scrollView.customRefreshControl ;
490490 if (refreshControl && refreshControl.isRefreshing && ![refreshControl isKindOfClass: UIRefreshControl.class]) {
491491 refreshControl.frame =
492492 (CGRect){_scrollView.contentOffset , {_scrollView.frame .size .width , refreshControl.frame .size .height }};
0 commit comments