Browse Source

fix double tap when back to screen via back gesture (#1931)

Ran Greenberg 7 years ago
parent
commit
6de5f2caae
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      ios/RCCViewController.m

+ 4
- 1
ios/RCCViewController.m View File

280
 - (void)_traverseAndCall:(UIView*)view
280
 - (void)_traverseAndCall:(UIView*)view
281
 {
281
 {
282
   if([view isKindOfClass:[UIScrollView class]] && ([[(UIScrollView*)view delegate] respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) ) {
282
   if([view isKindOfClass:[UIScrollView class]] && ([[(UIScrollView*)view delegate] respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) ) {
283
-    [[(UIScrollView*)view delegate] scrollViewDidEndDecelerating:(id)view];
283
+    dispatch_async(dispatch_get_main_queue(), ^{
284
+      [[(UIScrollView*)view delegate] scrollViewDidEndDecelerating:(id)view];
285
+    });
286
+  
284
   }
287
   }
285
   
288
   
286
   [view.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
289
   [view.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {