Browse Source

Bug fixed - the UIScrollView will break on iOS10 when building by XCode9 (#1896)

This only happens when you are using react-native@0.48.3, and your XCode is in version 9.0
Vito Chen 7 years ago
parent
commit
77b5c64ef1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      ios/RCCViewController.m

+ 1
- 1
ios/RCCViewController.m View File

@@ -292,7 +292,7 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
292 292
 // rnn issue - https://github.com/wix/react-native-navigation/issues/1858
293 293
 - (void)_traverseAndFixScrollViewSafeArea:(UIView *)view {
294 294
 #ifdef __IPHONE_11_0
295
-  if ([view isKindOfClass:UIScrollView.class]) {
295
+  if ([view isKindOfClass:UIScrollView.class] && [view respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) {
296 296
     [((UIScrollView*)view) setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
297 297
   }
298 298