Remove deprecated nativeScrollDelegate property
Summary: We deprecated it a while back and nobody is using it internally. Reviewed By: majak Differential Revision: D3542602 fbshipit-source-id: dfe11a47b21d2f8a7c946c902f0ea427615ffc31
This commit is contained in:
parent
ff3ab32a72
commit
ba4c34c0db
|
@ -383,8 +383,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
NSHashTable *_scrollListeners;
|
||||
}
|
||||
|
||||
@synthesize nativeScrollDelegate = _nativeScrollDelegate;
|
||||
|
||||
- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher
|
||||
{
|
||||
RCTAssertParam(eventDispatcher);
|
||||
|
@ -588,19 +586,6 @@ for (NSObject<UIScrollViewDelegate> *scrollViewListener in _scrollListeners) { \
|
|||
RCT_SCROLL_EVENT_HANDLER(scrollViewWillBeginDecelerating, onMomentumScrollBegin)
|
||||
RCT_SCROLL_EVENT_HANDLER(scrollViewDidZoom, onScroll)
|
||||
|
||||
- (void)setNativeScrollDelegate:(NSObject<UIScrollViewDelegate> *)nativeScrollDelegate
|
||||
{
|
||||
if (nativeScrollDelegate != _nativeScrollDelegate) {
|
||||
if (_nativeScrollDelegate) {
|
||||
[_scrollListeners removeObject:_nativeScrollDelegate];
|
||||
}
|
||||
if (nativeScrollDelegate) {
|
||||
[_scrollListeners addObject:nativeScrollDelegate];
|
||||
}
|
||||
_nativeScrollDelegate = nativeScrollDelegate;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addScrollListener:(NSObject<UIScrollViewDelegate> *)scrollListener
|
||||
{
|
||||
[_scrollListeners addObject:scrollListener];
|
||||
|
@ -608,11 +593,7 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidZoom, onScroll)
|
|||
|
||||
- (void)removeScrollListener:(NSObject<UIScrollViewDelegate> *)scrollListener
|
||||
{
|
||||
if (scrollListener == _nativeScrollDelegate) {
|
||||
[self setNativeScrollDelegate:nil];
|
||||
} else {
|
||||
[_scrollListeners removeObject:scrollListener];
|
||||
}
|
||||
[_scrollListeners removeObject:scrollListener];
|
||||
}
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
*/
|
||||
@protocol RCTScrollableProtocol
|
||||
|
||||
/*
|
||||
* The nativeScrollDelegate property is now deprecated please use the scrollListener API instead
|
||||
*/
|
||||
@property (nonatomic, weak) NSObject<UIScrollViewDelegate> *nativeScrollDelegate DEPRECATED_ATTRIBUTE;
|
||||
@property (nonatomic, readonly) CGSize contentSize;
|
||||
|
||||
- (void)scrollToOffset:(CGPoint)offset;
|
||||
|
|
Loading…
Reference in New Issue