瀏覽代碼

Fix crash with scrollViewDidEndDecelerating and RCTTextView (#1630)

See https://github.com/wix/react-native-navigation/issues/1446#issuecomment-319858633
Blair Vanderhoof 7 年之前
父節點
當前提交
33e861478c
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      ios/RCCViewController.m

+ 1
- 1
ios/RCCViewController.m 查看文件

@@ -277,7 +277,7 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
277 277
 // Back to normal after user start scroll with momentum
278 278
 - (void)_traverseAndCall:(UIView*)view
279 279
 {
280
-  if([view isKindOfClass:[UIScrollView class]]) {
280
+  if([view isKindOfClass:[UIScrollView class]] && ([[(UIScrollView*)view delegate] respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) ) {
281 281
     [[(UIScrollView*)view delegate] scrollViewDidEndDecelerating:(id)view];
282 282
   }
283 283