Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Dec 22, 2015
1 parent b73f848 commit caaeb2b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
18 changes: 9 additions & 9 deletions React/Views/RCTRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions React/Views/RCTRefreshControlManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ @implementation RCTRefreshControlManager

- (UIView *)view
{
return [RCTRefreshControl new];
return [RCTRefreshControl new];
}

RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(title, NSString)
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
28 changes: 14 additions & 14 deletions React/Views/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<UIView *> *)reactSubviews
Expand Down

0 comments on commit caaeb2b

Please sign in to comment.