diff --git a/ios/native/NativeMethods.mm b/ios/native/NativeMethods.mm index 58f1e20652f..505dd43b340 100644 --- a/ios/native/NativeMethods.mm +++ b/ios/native/NativeMethods.mm @@ -37,14 +37,10 @@ } -NSString *eventDispatcherKey = @"eventDispatcher"; void scrollTo(int scrollViewTag, RCTUIManager *uiManager, double x, double y, bool animated) { UIView *view = [uiManager viewForReactTag:@(scrollViewTag)]; RCTScrollView *scrollView = (RCTScrollView *) view; - RCTEventDispatcher* oldEventDispatcher = [scrollView valueForKey:eventDispatcherKey]; - [scrollView setValue:nil forKey:eventDispatcherKey]; [scrollView scrollToOffset:(CGPoint){(CGFloat)x, (CGFloat)y} animated:animated]; - [scrollView setValue:oldEventDispatcher forKey:eventDispatcherKey]; } }