diff --git a/React/Views/RCTRefreshControl.m b/React/Views/RCTRefreshControl.m index b4bbc4acd0cf7f..ad8898fe33c6c1 100644 --- a/React/Views/RCTRefreshControl.m +++ b/React/Views/RCTRefreshControl.m @@ -15,27 +15,27 @@ @implementation RCTRefreshControl - (instancetype)init { - if ((self = [super init])) { - [self addTarget:self action:@selector(refreshControlValueChanged) forControlEvents:UIControlEventValueChanged]; - } - return self; + if ((self = [super init])) { + [self addTarget:self action:@selector(refreshControlValueChanged) forControlEvents:UIControlEventValueChanged]; + } + return self; } RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) - (NSString*) title { - return [self.attributedTitle string]; + return [self.attributedTitle string]; } - (void) setTitle:(NSString *)title { - self.attributedTitle = [[NSAttributedString alloc] initWithString:title]; + self.attributedTitle = [[NSAttributedString alloc] initWithString:title]; } - (void)refreshControlValueChanged { - if (_onRefresh) { - _onRefresh(nil); - } + if (_onRefresh) { + _onRefresh(nil); + } } @end diff --git a/React/Views/RCTRefreshControlManager.m b/React/Views/RCTRefreshControlManager.m index 2796746c54fe41..b034a7ba4a64b5 100644 --- a/React/Views/RCTRefreshControlManager.m +++ b/React/Views/RCTRefreshControlManager.m @@ -17,7 +17,7 @@ @implementation RCTRefreshControlManager - (UIView *)view { - return [RCTRefreshControl new]; + return [RCTRefreshControl new]; } RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor) @@ -25,11 +25,11 @@ - (UIView *)view RCT_EXPORT_VIEW_PROPERTY(onRefresh, RCTDirectEventBlock) RCT_CUSTOM_VIEW_PROPERTY(refreshing, BOOL, RCTRefreshControl) { - if (json ? [RCTConvert BOOL:json] : defaultView.refreshing) { - [view beginRefreshing]; - } else { - [view endRefreshing]; - } + if (json ? [RCTConvert BOOL:json] : defaultView.refreshing) { + [view beginRefreshing]; + } else { + [view endRefreshing]; + } } @end diff --git a/React/Views/RCTScrollView.m b/React/Views/RCTScrollView.m index e88f0e305a1635..e5e2ffceddc70c 100644 --- a/React/Views/RCTScrollView.m +++ b/React/Views/RCTScrollView.m @@ -411,24 +411,24 @@ - (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews - (void)insertReactSubview:(UIView *)view atIndex:(__unused NSInteger)atIndex { - if ([view isKindOfClass:[RCTRefreshControl class]]) { - _scrollView.refreshControl = (RCTRefreshControl*)view; - } else { - RCTAssert(_contentView == nil, @"RCTScrollView may only contain a single subview"); - _contentView = view; - [_scrollView addSubview:view]; - } + if ([view isKindOfClass:[RCTRefreshControl class]]) { + _scrollView.refreshControl = (RCTRefreshControl*)view; + } else { + RCTAssert(_contentView == nil, @"RCTScrollView may only contain a single subview"); + _contentView = view; + [_scrollView addSubview:view]; + } } - (void)removeReactSubview:(UIView *)subview { - if ([subview isKindOfClass:[RCTRefreshControl class]]) { - _scrollView.refreshControl = nil; - } else { - RCTAssert(_contentView == subview, @"Attempted to remove non-existent subview"); - _contentView = nil; - [subview removeFromSuperview]; - } + if ([subview isKindOfClass:[RCTRefreshControl class]]) { + _scrollView.refreshControl = nil; + } else { + RCTAssert(_contentView == subview, @"Attempted to remove non-existent subview"); + _contentView = nil; + [subview removeFromSuperview]; + } } - (NSArray *)reactSubviews