Fixed OSS scroll view bug caused by FBPullToRefresh

Summary:
When I bridged FBPullToRefresh to RN, the integration with ScrollView caused a bug on OSS

TLDR; assuming that a scrollview subview that implemented UIScrollViewDelegate protocol was a custom PTR was a bad idea. This caused some scrollviews to break in OSS. The solution is to define a more explicit protocol.

Further details here:
https://github.com/facebook/react-native/issues/20324

Reviewed By: mmmulani

Differential Revision: D8953893

fbshipit-source-id: 98cdc7fcced41d9e98e77293a03934f10c798665
This commit is contained in:
Peter Argany
2018-07-23 13:17:33 -07:00
committed by Facebook Github Bot
parent 1f545743b9
commit fab5fffbb3
3 changed files with 33 additions and 21 deletions

View File

@@ -8,8 +8,9 @@
#import <UIKit/UIKit.h>
#import <React/RCTComponent.h>
#import <React/RCTScrollableProtocol.h>
@interface RCTRefreshControl : UIRefreshControl
@interface RCTRefreshControl : UIRefreshControl <RCTCustomRefreshContolProtocol>
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) RCTDirectEventBlock onRefresh;