File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
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;
@@ -155,16 +154,18 @@ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
155154- (void )scrollViewWillEndDragging : (UIScrollView *)scrollView withVelocity : (CGPoint)velocity targetContentOffset : (inout CGPoint *)targetContentOffset {
156155 int position = [self getCurrentPage ];
157156 [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++]];
160157}
161158
162159- (void )scrollViewDidEndDecelerating : (UIScrollView *)scrollView {
160+ int position = [self getCurrentPage ];
163161 [self .eventDispatcher sendEvent: [[RCTOnPageScrollStateChanged alloc ] initWithReactTag: self .reactTag state: @" idle" coalescingKey: _coalescingKey++]];
162+
163+ [self .eventDispatcher sendEvent: [[RCTOnPageSelected alloc ] initWithReactTag: self .reactTag position: [NSNumber numberWithInt: position] coalescingKey: _coalescingKey++]];
164164}
165165
166166-(void )scrollViewDidEndScrollingAnimation : (UIScrollView *)scrollView {
167167 int position = [self getCurrentPage ];
168+ NSLog (@" position scrollViewDidEndScrollingAnimation %d " , position);
168169
169170 [self .eventDispatcher sendEvent: [[RCTOnPageSelected alloc ] initWithReactTag: self .reactTag position: [NSNumber numberWithInt: position] coalescingKey: _coalescingKey++]];
170171}
You can’t perform that action at this time.
0 commit comments