File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ - (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDis
3636 _dismissKeyboard = UIScrollViewKeyboardDismissModeNone;
3737 _coalescingKey = 0 ;
3838 _eventDispatcher = eventDispatcher;
39- _overdrag = NO ;
4039 [self embed ];
4140 }
4241 return self;
@@ -153,18 +152,19 @@ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
153152}
154153
155154- (void )scrollViewWillEndDragging : (UIScrollView *)scrollView withVelocity : (CGPoint)velocity targetContentOffset : (inout CGPoint *)targetContentOffset {
156- int position = [self getCurrentPage ];
157155 [self .eventDispatcher sendEvent: [[RCTOnPageScrollStateChanged alloc ] initWithReactTag: self .reactTag state: @" settling" coalescingKey: _coalescingKey++]];
158-
159- [self .eventDispatcher sendEvent: [[RCTOnPageSelected alloc ] initWithReactTag: self .reactTag position: [NSNumber numberWithInt: position] coalescingKey: _coalescingKey++]];
160156}
161157
162158- (void )scrollViewDidEndDecelerating : (UIScrollView *)scrollView {
159+ int position = [self getCurrentPage ];
163160 [self .eventDispatcher sendEvent: [[RCTOnPageScrollStateChanged alloc ] initWithReactTag: self .reactTag state: @" idle" coalescingKey: _coalescingKey++]];
161+
162+ [self .eventDispatcher sendEvent: [[RCTOnPageSelected alloc ] initWithReactTag: self .reactTag position: [NSNumber numberWithInt: position] coalescingKey: _coalescingKey++]];
164163}
165164
166165-(void )scrollViewDidEndScrollingAnimation : (UIScrollView *)scrollView {
167166 int position = [self getCurrentPage ];
167+ NSLog (@" position scrollViewDidEndScrollingAnimation %d " , position);
168168
169169 [self .eventDispatcher sendEvent: [[RCTOnPageSelected alloc ] initWithReactTag: self .reactTag position: [NSNumber numberWithInt: position] coalescingKey: _coalescingKey++]];
170170}
You can’t perform that action at this time.
0 commit comments