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