Просмотр исходного кода

Inset adjustment behavior should be automatic

Otherwise, if the users sets custom insets (additional insets), they override the system adjusted insets. This is not the expected behavior.
Leo Natan 7 лет назад
Родитель
Сommit
96c1436357
No account linked to committer's email address
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      ios/RNNSwizzles.m

+ 1
- 1
ios/RNNSwizzles.m Просмотреть файл

20
 	id returnValue = __SWZ_initWithEventDispatcher_orig(self, _cmd, eventDispatcher);
20
 	id returnValue = __SWZ_initWithEventDispatcher_orig(self, _cmd, eventDispatcher);
21
 	
21
 	
22
 	if (@available(iOS 11.0, *)) {
22
 	if (@available(iOS 11.0, *)) {
23
-		[(UIScrollView*)[returnValue valueForKey:@"scrollView"] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentAutomatic];
23
+		[(UIScrollView*)[returnValue valueForKey:@"scrollView"] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentAlways];
24
 	}
24
 	}
25
 	
25
 	
26
 	return returnValue;
26
 	return returnValue;