Bridged FBPullToRefresh to JS

Reviewed By: shergin

Differential Revision: D6875099

fbshipit-source-id: 00bbad7569ff047a77f198ad2bf4d77fccbaa2e9
This commit is contained in:
Peter Argany 2018-03-27 17:56:05 -07:00 committed by Facebook Github Bot
parent 979c01ed2d
commit f96d7ae648
1 changed files with 8 additions and 0 deletions

View File

@ -443,6 +443,11 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view,
#if !TARGET_OS_TV
if ([view isKindOfClass:[RCTRefreshControl class]]) {
[_scrollView setRctRefreshControl:(RCTRefreshControl *)view];
}
else if ([view conformsToProtocol:@protocol(UIScrollViewDelegate)]) {
[self addScrollListener:(UIView<UIScrollViewDelegate> *)view];
[_scrollView addSubview:view];
[_scrollView sendSubviewToBack:view];
} else
#endif
{
@ -459,6 +464,9 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view,
#if !TARGET_OS_TV
if ([subview isKindOfClass:[RCTRefreshControl class]]) {
[_scrollView setRctRefreshControl:nil];
} else if ([subview conformsToProtocol:@protocol(UIScrollViewDelegate)]) {
[self removeScrollListener:(UIView<UIScrollViewDelegate> *)subview];
[subview removeFromSuperview];
} else
#endif
{