Browse Source

fixed swizzle in xcode 8

yogevbd 7 years ago
parent
commit
a1d2bd9dee
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      ios/RNNSwizzles.m

+ 3
- 1
ios/RNNSwizzles.m View File

17
 - (id)__swz_initWithEventDispatcher:(id)eventDispatcher
17
 - (id)__swz_initWithEventDispatcher:(id)eventDispatcher
18
 {
18
 {
19
 	id returnValue = __SWZ_initWithEventDispatcher_orig(self, _cmd, eventDispatcher);
19
 	id returnValue = __SWZ_initWithEventDispatcher_orig(self, _cmd, eventDispatcher);
20
-	
20
+
21
+	#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0	
21
 	if (@available(iOS 11.0, *)) {
22
 	if (@available(iOS 11.0, *)) {
22
 		[(UIScrollView*)[returnValue valueForKey:@"scrollView"] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentAutomatic];
23
 		[(UIScrollView*)[returnValue valueForKey:@"scrollView"] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentAutomatic];
23
 	}
24
 	}
25
+	#endif
24
 	
26
 	
25
 	return returnValue;
27
 	return returnValue;
26
 }
28
 }